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
WorkHard
Helper V
Helper V

Make a measure with a filter ignore user filters/slicers

I need to create a measure that counts the total quantity of an item while ignoring a specific keyword ("ignore").

 

The below DAX snippet works great except when I apply a filter in a visual or use slicers, I need the measure to ignore those filters. Is there a way to achieve this?

 

 

 

MyCount = CALCULATE (
    COUNT('My Data'[Model]),
    FILTER ( 'My Data', Search ( "ignore", 'My Data'[Display As],, 0 ) = 0 )
)

 

 

 

 

1 ACCEPTED SOLUTION
pranit828
Community Champion
Community Champion

HI @WorkHard 

You can use

MyCount = CALCULATE (
    COUNT('My Data'[Model]),
    FILTER (ALLEXCEPT('My Data','My Data'[col1],'My Data'[col2]), Search ( "ignore", 'My Data'[Display As],, 0 ) = 0 )
)

In place of col1 use the colunm used in the 1st filter and same for col2 for 2nd filter, if you have more add Col3 col4 ...





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

View solution in original post

1 REPLY 1
pranit828
Community Champion
Community Champion

HI @WorkHard 

You can use

MyCount = CALCULATE (
    COUNT('My Data'[Model]),
    FILTER (ALLEXCEPT('My Data','My Data'[col1],'My Data'[col2]), Search ( "ignore", 'My Data'[Display As],, 0 ) = 0 )
)

In place of col1 use the colunm used in the 1st filter and same for col2 for 2nd filter, if you have more add Col3 col4 ...





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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