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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.