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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Remove page filter, respect legend filter in visual

Hi everyone!

 

I have a table of service IDs, ages, and corrisponding age 'bucket' logic as seen below.

 

IdAgeAge bucket
121-2
242-14
36031 and up
46131 and up
52015-30
6142-14
73015-30
811-2
942-14

 

On the page that contains my visual i have a page filter to only show IDs greater than 10 days - most other visuals on this page adhear to this criteria. However i require one visual to show the count of IDs regardless of what age bucket they are in, so i write the following measure to allow that, which works great for calculating the total count (like in a card, that has no other context):

 

DistCountRemAge = calculate(DISTINCTCOUNT('Table'[Id]),REMOVEFILTERS(('Table'[Age])))

 

but when in a doughnut chart, or a matrix, in the context of the age buckets, the data from the '1-2' catagory is excluded as it does not include any values greater than 10 - but the values from the '2-14' bucket are included, as there is one value greater than 10 in that bucket.

 

What i would like to know, if its possible to write a measure that removes the page filter, but keep the filter in the context of the visual, IE: where all 4 buckets show in the doughnut chart and in the matrix when using this measure, and i can keep the page filter as well.

 

help visual.PNG

 

You can download the file here to take a look: 

http://www.filedropper.com/removeagefilterhelp

 

Thanks everyone!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @TomMartens,

 

Thanks so much for the article link. The solution was pretty easy, i just created a dimension table for the bucket labels and used that in the row/legend fields as you'll see below, as well as the measure i used before.

 

DistCountRemAge = calculate(DISTINCTCOUNT('Table'[Id]),REMOVEFILTERS(('Table'[Age])))

 

Thanks again!

 

dimtable.PNGfixed.PNG

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey @Anonymous ,

 

as @Greg_Deckler already mentioned: it's gone and can't be brought back by using DAX alone.

Reason for this: the dreaded one-table solution (as I call it) or more educated explanation can be found in this article: https://www.sqlbi.com/articles/understanding-dax-auto-exist/

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi @TomMartens,

 

Thanks so much for the article link. The solution was pretty easy, i just created a dimension table for the bucket labels and used that in the row/legend fields as you'll see below, as well as the measure i used before.

 

DistCountRemAge = calculate(DISTINCTCOUNT('Table'[Id]),REMOVEFILTERS(('Table'[Age])))

 

Thanks again!

 

dimtable.PNGfixed.PNG

Greg_Deckler
Community Champion
Community Champion

Hmm, tried a number of things and it doesn't look like it. The issue is that there appears to be pre-filtering going on where the category is getting filtered out before the DAX measure does anything. So basically it is gone in the visual and you can't bring it back via DAX as far as I can tell.


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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors