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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors