Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How do i exclude categories based on slicer selection?

I have table with user names. i need a slice with options "all data" and "exclude user A". when 1st option is selected i need to display all data in the matrix. When i select second option i need to ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    After my researching, I updated my reply.

    You can create a table with two options for the slicer.

    Then create a measure for the visual-level filters.

    Measure =
    IF (
        SELECTEDVALUE ( 'Slicer Value'[Option] ) = "all data",
        1,
        IF (
            SELECTEDVALUE ( 'Slicer Value'[Option] ) = "exclude user A"
                && MAX ( 'Table'[user] ) <> "A",
            1
        )
    )
    

    Put the meausre into the filters and set up show items when the value is 1.

    When "all data" is selected, all data are displayed.

    When "exclude user A" is selected, data without user A are displayed.

     

     

    Best Regards,

    Stephen Tao

     

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