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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

MartinL

Well-known Member
Joined
Oct 16, 2008
Messages
1,110
Office Version
  1. 365
Platform
  1. Windows
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
 

masplin

Active Member
Joined
May 10, 2010
Messages
411
In the new column put

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

Mike
 

Watch MrExcel Video

Forum statistics

Threads
1,130,110
Messages
5,640,147
Members
417,127
Latest member
shakilk

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
Top