DAX - Is it something for SUMX ? Cannot make it work

Vander1981

New Member
Joined
Jun 20, 2017
Messages
18
Hi All,

I have got a problem :)

My data model is the following one : Calendar Table; Product Table; Geography Table; Sales Table.

I created a measure that does the work at the exception of the Grand Total of my Pivot which display a sales extrapolation for each Business area.

DIVIDE ( [Total Sales] ; [Achieved Days] ) * Working Days

What I would like to achieve is that at the Grand total, the measure sums up all the extrapolations at business area level.

I tried every possibility with SUMX but could not solve this.

Thanks a lot for your help.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
The pattern for aggregating at an already aggregated level is:

Code:
SUMX(
    VALUES(Table[BusinessArea],
    CALCULATE("Your measure here")
)

You need a column with business areas in it that you can enter in the first part. The formula says:

1. Iterate over the list of unique values in the Business Area column
2. The CALCULATE part converts this from a row context to a filter context so that at each row of the iteration all the related items are visible to the measure
3. Calculate your measure for each business area
4. Sum up the results (could just as well be a max or average or something)

Measures come with their own implicit CALCULATE, so you can actually skip it if you use a measure rather than a formula.
 
Upvote 0
Thank you Gazpage for this really valuable explanation.

It worked just fine !

My error was that I didn't use the CALCULATE part :)
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,685
Members
449,463
Latest member
Jojomen56

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