Calculation based upon subtotal in group

CLEARIFY

New Member
Joined
Oct 2, 2011
Messages
11
This should be very simple, but I am obviously missing something here - PowerPivot 2013.

In this example I am trying to get revenue per employee (highlighted in yellow)
revenue_per_employee.png


In order to do that I need the numerator to appear in every row (red arrow in subtest)

I thought this would do the trick, but ...=CALCULATE(sum('JOB COST DETAILS'[Job Line Income Amount]),ALLEXCEPT(Employee,Employee[Employee Name]))

This example only has one job name, that would normally appear in a list of many jobs.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
This should be very simple, but I am obviously missing something here - PowerPivot 2013.

In this example I am trying to get revenue per employee (highlighted in yellow)
revenue_per_employee.png


In order to do that I need the numerator to appear in every row (red arrow in subtest)

I thought this would do the trick, but ...=CALCULATE(sum('JOB COST DETAILS'[Job Line Income Amount]),ALLEXCEPT(Employee,Employee[Employee Name]))

This example only has one job name, that would normally appear in a list of many jobs.

are you trying to populate the column with red arrow with the same number (163,205). try CALCULATE(sum('JOB COST DETAILS'[Job Line Income Amount]),ALLEXCEPT(Employee,Employee[Job Name]))
 
Upvote 0
are you trying to populate the column with red arrow with the same number (163,205). try CALCULATE(sum('JOB COST DETAILS'[Job Line Income Amount]),ALLEXCEPT(Employee,Employee[Job Name]))

Job name is not part of the employee table, but if I used =CALCULATE(sum('JOB COST DETAILS'[Job Line Income Amount]),ALLEXCEPT(Job,Job[Job Name])) I still don't get the same result.
 
Upvote 0
in your formula you have used ALLEXCEPT(Employee,Employee[Employee Name])), which removes all filter coming from your pivot table. Is this what you really want? try ALL(Employee,Employee[Employee Name]) instead.

you have a couple slicers in your report I would assume you want to keep the filer context coming from those.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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