Forum Discussion

leekohr's avatar
leekohr
Microsoft Employee
4 years ago
Solved

On or Off filter

Created a calculated column in DAX that has two values a true or false.  This works and if I add a slicer, I can select either true or false.  What I would like is to be able to have On or Off filter.  Either I filter for true values, or it selects all.  I do not need false values. 

 

Little background

The calculated column returns the most recent record and I either one the uses to see only these records or for them to see all records. 

  • Hi, leekohr 

     

    You can try the following methods.

    Measure = IF(SELECTEDVALUE('Table'[Value])=TRUE(),1,0)

    Put Measure into the Filter of the slicer and set it equal to 1.

    You can see all the data when the slicer is not selected. If you select the slicer, you will see only True data.

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Hi leekohr 

     

    You can set your filters and then create a bookmarks one for True and one for All. Assign those Bookmarks to buttons and then you can give an option to the end-users to click on those buttons and filter

    https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks

    https://www.youtube.com/watch?v=xCMqWEvSkAs

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos!! 

    LinkedIn | Twitter | Blog | YouTube 

     the data.

     

     

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, leekohr 

     

    You can try the following methods.

    Measure = IF(SELECTEDVALUE('Table'[Value])=TRUE(),1,0)

    Put Measure into the Filter of the slicer and set it equal to 1.

    You can see all the data when the slicer is not selected. If you select the slicer, you will see only True data.

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.