Getting total sales for a category

ppvtuser

New Member
Joined
May 7, 2012
Messages
5
I have a powerpivot table that has the following columns:

product name, category, sales

I would like to insert a calculated column that calculate the total category sales. Example
product name, category, sales, total category sales
ipad, tablets, 5, 8
samsung tab 10.1, tablets, 3, 8
galaxy s3, mobiles, 2, 5
iphone, mobiles, 3, 5

how can i achieve that?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi
What I did to create Rate of Sale was:
In the powerpivot screen
click on new measure
Enter the Table Name where your data comes from ie DataFile
Enter a random name for your new value ie TotSales
then in Formula enter

=AverageX(DataFile, DataFile[Value Sales]) / SUMX(DataFile,DataFile[Store Numeric Distribution])As you enter the Table name each time the fields will appear for you to choose
I know this does not completly answer your question but hopfully it will give you something to play with until another answer comes along

Martin
 
Upvote 0
In the new column put

=CALCULATE(sum(Table1[Sales]),filter(table1,table1[Category]=EARLIER(Table1[Category])))

Mike
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top