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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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