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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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 exclude user A from the matrix and display rest of the data. 

 

Structure of the matrix is user and task as rows with year on column with count(id) as values.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

After my researching, I updated my reply.

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

vstephenmsft_0-1672196756979.png

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.

vstephenmsft_1-1672196815261.png

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

vstephenmsft_2-1672196870427.png

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

vstephenmsft_3-1672196877380.png

 

 

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.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

After my researching, I updated my reply.

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

vstephenmsft_0-1672196756979.png

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.

vstephenmsft_1-1672196815261.png

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

vstephenmsft_2-1672196870427.png

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

vstephenmsft_3-1672196877380.png

 

 

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.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors