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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Limit slicer based on multiple slicers

Hi,

I've built 4 identical slicers each with different types of cancer a person can have across their lifetime. The full list has 10 cancer types and would like subsequent slicers to only have the option to select those not already chosen from previous slicers. At the moment I can incorrectly select the same cancers across all 4 slicers. can you assist? 

 

pic.JPGpic2.png

2 ACCEPTED SOLUTIONS
PaulDBrown
Community Champion
Community Champion

For the slicers to be mutually exclusive, you need to create a measures to use in each slicer as a filter in the filter pane, following this (CT Slicer * is the name of each table used as slicers):

 

Filter 1 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S2, S3, S4))
    RETURN
COUNTROWS(
    EXCEPT(S1,SelectedCT))
Filter 2 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S1, S3, S4))
    RETURN
COUNTROWS(
    EXCEPT(S2, SelectedCT))
Filter 3 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S1,S2,S4))
    RETURN
COUNTROWS(
    EXCEPT(S3,SelectedCT))
Filter 4 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S1,S2,S3))
    RETURN
COUNTROWS(
    EXCEPT(S4,SelectedCT))

 

Now add each measure to the filter pane for each corresponding slicer. Before you set the filter, select a  different value for each slicer

Then set the value of each measure  in each filter to = 1.

f4slicers.gif

 

I've attached the sample PBIX file

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

Anonymous
Not applicable

This is brilliant. Just bedded this into my dashboard and works a treat. Many thanks Paul.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This is brilliant. Just bedded this into my dashboard and works a treat. Many thanks Paul.

PaulDBrown
Community Champion
Community Champion

For the slicers to be mutually exclusive, you need to create a measures to use in each slicer as a filter in the filter pane, following this (CT Slicer * is the name of each table used as slicers):

 

Filter 1 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S2, S3, S4))
    RETURN
COUNTROWS(
    EXCEPT(S1,SelectedCT))
Filter 2 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S1, S3, S4))
    RETURN
COUNTROWS(
    EXCEPT(S2, SelectedCT))
Filter 3 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S1,S2,S4))
    RETURN
COUNTROWS(
    EXCEPT(S3,SelectedCT))
Filter 4 = 
VAR S1 = 'CT Slicer 1'
VAR S2 = 'CT Slicer 2'
VAR S3 = 'CT Slicer 3'
VAR S4 = 'CT Slicer 4'
VAR SelectedCT = 
DISTINCT(
    UNION(S1,S2,S3))
    RETURN
COUNTROWS(
    EXCEPT(S4,SelectedCT))

 

Now add each measure to the filter pane for each corresponding slicer. Before you set the filter, select a  different value for each slicer

Then set the value of each measure  in each filter to = 1.

f4slicers.gif

 

I've attached the sample PBIX file

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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 Kudoed Authors