Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Euro0681
Helper II
Helper II

Measure Calculations??

So maybe this is a simple question to you guys, but if I have a "Page Level Filter" on a report will my measure take that filter into consideration before starting it's calculation?? 
Also, another question if my measure is iterating on a row by row basis (using "Sumx") to calculate "Accumaltive Sum" will it also iterate through "NULL" Values?

Example (1st question): 
If I have 60,000 suppliers, I'm calculating total sales per suppliers but I have a Page Level Filter that selects the last 12 months and also in the last 12 months only 10000 Suppliers have made sales will my measure still iterate through all 60,000 suppliers or will it take into account the page filter before calculating?

1 ACCEPTED SOLUTION

Using ALLSELECTED will take it into consideration, at the level you specify in the function. Keep in mind ALLSELECTED is a complicated function and should be used carefully.
I suggest taking some time to read the following post to get a better understanding.

ALLSELECTED 

View solution in original post

4 REPLIES 4
PabloDeheza
Solution Sage
Solution Sage

Hi @Euro0681 !
Measures work on the current Filter Context, your filter context is defined by al filters applied to the visualization where your measure is working, so short anwers, yes, your measure is calculated after the filter is taken into consideration. In your example, your measure will iterate on 10000 Suppliers if no fuction like ALL is being used inside it.
Question 2, if the table your are iterating for some reason contains null, sumx will iterate them

 

Let me know if that helps!

@PabloDeheza, If using allselected in my calculation will it then not take into account the page filter? The reasoning or using this is because I have some slicers that the user will then click and I want the calculation to take those into account and adjust accordingly?

Using ALLSELECTED will take it into consideration, at the level you specify in the function. Keep in mind ALLSELECTED is a complicated function and should be used carefully.
I suggest taking some time to read the following post to get a better understanding.

ALLSELECTED 

Greg_Deckler
Super User
Super User

@Euro0681 The page filter will pre-filter the context for the measure, so it will not be going through all 60,000 suppliers essentially, just whatever happens to be in the filter context at the time the measure calculates. If you don't want to sum the null values (not that it would impact the result, then you could do:

SUMX(FILTER('Table',[Value] <> BLANK(), [Value])

 

This will add additional filter context to whatever is being passed by the page filter, visual filters and any cross filtering going on between visuals.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors