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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

A Measure That Ignores Page Level Filters

I have a page with some page level filters

 

I have a measure 

Measure = CALCULATE(AVERAGE(CustomerData[Score]),
FILTER(ALL(CustomerData), CustomerData[ProductLine] = "xxx"),
FILTER(ALL(CustomerData), CustomerData[Tenure] > 123))
 
on an empty page the above measure value is 2.45
 
but if I place this on a page with page level filters then the value is 2.25, so the page filters are affecting this value
 
Can someone please fix my measure such that it always displays 2.45 rgeardless of any filters on the page.
 
Thank You!  
1 ACCEPTED SOLUTION
Nickgastaldi
Resolver I
Resolver I

i can be very wrong, but i believe that this 

Measure = CALCULATE(AVERAGE(CustomerData[Score]),
FILTER(ALL(CustomerData), CustomerData[ProductLine] = "xxx"),
FILTER(ALL(CustomerData), CustomerData[Tenure] > 123))

actually doesnt do what you expect it to do, the second filter is actually overwriting the first one,

 

you should try this:

Measure = CALCULATE(
                  AVERAGE(CustomerData[Score]),
                  FILTER(ALL(CustomerData), 
                                     CustomerData[ProductLine] = "xxx" 
                                      && CustomerData[Tenure] > 123)
)

also, the ALL filter will ignore all filter outside the CALCULTE context, so is highly improbable that what is bugging your calculation is the page level filter; try fixing the measure as above and if you can help us with some context, example, demo, anything more material.

 

😉 

View solution in original post

4 REPLIES 4
Nickgastaldi
Resolver I
Resolver I

i can be very wrong, but i believe that this 

Measure = CALCULATE(AVERAGE(CustomerData[Score]),
FILTER(ALL(CustomerData), CustomerData[ProductLine] = "xxx"),
FILTER(ALL(CustomerData), CustomerData[Tenure] > 123))

actually doesnt do what you expect it to do, the second filter is actually overwriting the first one,

 

you should try this:

Measure = CALCULATE(
                  AVERAGE(CustomerData[Score]),
                  FILTER(ALL(CustomerData), 
                                     CustomerData[ProductLine] = "xxx" 
                                      && CustomerData[Tenure] > 123)
)

also, the ALL filter will ignore all filter outside the CALCULTE context, so is highly improbable that what is bugging your calculation is the page level filter; try fixing the measure as above and if you can help us with some context, example, demo, anything more material.

 

😉 

Anonymous
Not applicable

It worked Thank You!

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous, 

 

According to my test, it seems impossible since you have clear all the filters on [CustomerData]. Can you share a dummy sample? Please upgrade the Desktop to the latest version. Please refer to my test. 

A-Measure-That-Ignores-Page-Level-Filters

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

yeah sure, can you paste your measure!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.