Powerpivot group sum on calculated field

edusuro

New Member
Joined
Aug 12, 2014
Messages
14
Hi,

I am using a calculated field to get sum of an item so that I can then manipulate it with some formulas. The rows on the pivot table are grouped into a category. I am trying to figure out a way to show the total sum of the group where the items belong instead of the sum for that single item. Example below:

Group 1 5
User 1 1
User 2 2
User 3 2

I need to figure out a formula that will provide the group total (in this example 5), no matter what row I'm at.:confused:

Thanks in advance!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Having a bit of a tough time understand what you are asking, but I THINK you are saying that... you want to a measure that returns the Group total, even for individual users?

=CALCULATE([MyMeasure], ALL(MyTable[User]))
 
Upvote 0
Hi there scottsen!

You are correct, I want a measure that returns the SubGroup Total. I am currently using the following formula, however, it still returns the individual results.

=CALCULATE(SUM([MyMeasure]),ALL(MyTable[SubGroup]))
 
Upvote 0
Well, that is because you did ALL(MyTable[SubGroup]) instead of what I said... ALL(MyTable[User]) :)

What ALL() does is remove the filter (on the specified column). So where normally each row is filtered by a specific user, you are saying "remove the filter on user" aka "show me the result pretending ALL() users are included".
 
Upvote 0
You were right. Thanks again for your help!

I had another question related to this. I have a calculated field showing up the value I want for each record. However, for the subtotal, I would like to show the sum of the values in each of the records instead of having the calculated field calculate the value again for the with the data at the aggregate level. How would I be able to obtain this result?

Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,034
Messages
6,176,001
Members
452,695
Latest member
Alhassan

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