how to sum a subtotal of a calculated measure istead of using the fromula in the subtotals

powerpivotdaniel

New Member
Joined
Mar 1, 2013
Messages
5
Hey,

This sounds like an easy problem, cause I just want the subtotal for each salesperson to be a sum of the customers below in the Bonus coloumn istead of a calculation. The Bonus measure formula is like this:

=(1-[Discount])*[Sum af Net]Very simpel stuff.
The problem is that the subtotals for the salesperson Daniel is 547.679 but if I summarize all the customer below him that summarize to 584.245, which is the number I want in the subtotals. Any idea how to do that? (the list below is not complete)
RækkenavneGrossNetDiscountBonus
Callcenter24.410.15113.929.01343%8.004.784
Anne Nordhausen2.683.3631.710.10535%1.105.550
Charlotte Colditz Andersen2.709.5381.468.81646%799.211
Daniel Wenzel-Arnberg1.315.602848.19535%547.679
ASGER'S AUTO- & TRAILERSERVICE5.9444.45825%3.344
ATELIER BAR'ART2.5761.92715%1.638
AUTO BRANDT2.1002.1000%2.100
BALLERUP KRÆMMERFESTIVAL AF 20128.5544.51740%2.710
BRDR. FUGLSANG VVS A/S82.48529.69564%10.690
COMPACT CLEAN APS6766760%676
CRAWFORD CENTER KØBENHAVN42.06728.25733%18.981
DANSK INDUSTRI- OG SKADESERVICE SJÆLLAND APS16.20016.2000%16.200
EJENDOMSMÆGLERFIRMAET HANS KORSGAARD2.6562.6560%2.656
ERGOMED CLINICAL RESEARCH LTD.40.56828.39730%19.878
FJORD-BUS A/S3.2703.2700%3.270
FLEX GULVSERVICE7007000%700
FRANCK GEOTEKNIK A/S2.8952.8950%2.895
FREDERIKSSUND BREMSESERVICE13.8986.48353%3.025
FYRSTENTHALS TAG-ENTREPRISE APS43.43930.08631%20.837

<colgroup><col style="width: 308pt;" width="411"> <col style="width: 59pt;" span="2" width="78"> <col style="width: 46pt;" width="61"> <col style="width: 53pt;" width="71"> </colgroup><tbody>
</tbody>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You need a SUMX to do this. How you set it up depends on how your underlying data tables are set up.

Do you have a separate customer table? If so, then try something like Bonus:=SUMX('Customer Table', (1-[Discount]) * [Sum of Net])

If you don't have a separate customer table and all your data is just stored in one table then try Bonus:=SUMX(VALUES('Table1'[Customers]), (1-[Discount]) * [Sum of Net])

SUMX basically evalutes an equation or another measure, individually for each row of the table specified in the first arguement. Then it remembers the result for each row and simply adds it all together at the end. Almost anytime you use a percentage or other ratio in a measure, you will need to use SUMX to get the subtotals to correctly appear as the sum of all underlying rows. Otherwise, your measure is just evaluating on salesperson aggregates. SUMX forces it to look at each row on its own.

SUMX is slow on very large tables, since it evaluates for each row, so it is best to always try and use it on smaller tables where possible.
 
Upvote 0

Forum statistics

Threads
1,216,068
Messages
6,128,595
Members
449,460
Latest member
jgharbawi

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