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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
liran
Frequent Visitor

how to ignore slicer in calculate

hi, i am trying to create a measure that ignores a certain slicer, but will be affected from others.

i tried =calculate(distinctcount(Member),all(table)) but that return all the table but i want it to be affected by other slicers.

 

1 ACCEPTED SOLUTION
vik0810
Resolver V
Resolver V

Instead

 

calculate(distinctcount(Member),all(table))

try

 

calculate(distinctcount(Member), all(table[Column]))

View solution in original post

6 REPLIES 6
vik0810
Resolver V
Resolver V

Instead

 

calculate(distinctcount(Member),all(table))

try

 

calculate(distinctcount(Member), all(table[Column]))
liran
Frequent Visitor

thank you! 

tex628
Community Champion
Community Champion

This is really messy, but I think i might know something close to a solution. 

 

First, it might be possible to do it with ALLEXCEPT() instead of ALL(). Just include every other filter and it might work. **bleep**ty solution tho.

 

Next... 

 

I dont know if this works because i've not tried it...

 

IF(SELECTEDVALUE([Column]);CALCULATE(DISTINCTCOUNT([Member];FILTER(ALL([Table]);SELECTEDVALUE([Column]))

 

What might not might not work is the filter(all(table);selectedvalue())
I dont know if it's possible to use the FILTER function on a table already affected by the ALL function...

 

Best of luck! 

 

/ Johannes


Connect on LinkedIn
liran
Frequent Visitor

yes it will work with the ALLEXCEPT and include all the filters i want, but i am trying to create a measure that is more flexible and that i wont need to add another value to the ALLEXCEPT every time.

 

i am trying to use SELECTEDVALUE but i can't find such formula

Have a look at CALCULATETABLE function.


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

how exactly? 

 

i also tried using keepfilter but i didn't succeed

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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