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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Boykins84
Frequent Visitor

When selecting two or more slicers, other slicers gets disabled

Hi Everyone,

 

I need your help with this.

We have three or more independent slicers in our report.

The requirement is: if a user selects one value from Slicer A and B or more, they can't select anything from Slicer C, D, or others, and vice versa.

There is a thread for this functionality for a single slicer here: https://community.fabric.microsoft.com/t5/Desktop/When-selecting-one-slicer-other-slicer-gets-disabl...

 

Thanks

2 ACCEPTED SOLUTIONS
jdbuchanan71
Super User
Super User

@Boykins84 

You can extend @OwenAuger solution by combing the check on A and B into a single check, then you would apply that as a filter on the the slicers for C and D.

A and B filtered = 
VAR _A = INT ( ISFILTERED ( 'Attribute A'[Attribute A] ) )
VAR _B = INT ( ISFILTERED ( 'Attribute B'[Attribute B] ) )
RETURN _A * _B

If there is a filter on both A and B, this measure will return 1, if there is not a filter on both, it will return 0.

Then you set a visual level filter on the C and D slicers for [A and B filtered] is not 1.

View solution in original post

jdbuchanan71
Super User
Super User

In that case, you make a measure that checks all the other columns except one, then apply that as the filter on the slicer for that column.  

In my example I made 4 meausres to check columns on a customer table

Gender

Education

Occupation

Marital Staus

jdbuchanan71_0-1731504427266.png

I make a measure like this:

ABC = 
VAR _A = INT ( ISFILTERED ( Customer[Gender] ) )
VAR _B = INT ( ISFILTERED ( Customer[Education] ) )
VAR _C = INT ( ISFILTERED ( Customer[Occupation] ) )
RETURN ( _A + _B + _C )

This gets applied to the D slicer (Marital Status) as a visual level filter

jdbuchanan71_5-1731504700515.png

 

If I select a value in 2 of the other slicers (any 2) it blanks ount the D slicer:

jdbuchanan71_2-1731504548716.png

You make a measure for each slicer that checks all the other columns and set the same filter.

For the A slicer, the measure is

BCD = 
VAR _B = INT ( ISFILTERED ( Customer[Education] ) )
VAR _C = INT ( ISFILTERED ( Customer[Occupation] ) )
VAR _D = INT ( ISFILTERED ( Customer[Marital Status] ) )
RETURN ( _B + _C + _D )

It check the other 3 columns.  And the filter you apply to the A slicer is this:

jdbuchanan71_3-1731504641250.png

So when I select somthing in B and C, the A and D slicers are blanked out.

jdbuchanan71_6-1731504778069.png

 

 

 

 

 

 

View solution in original post

4 REPLIES 4
jdbuchanan71
Super User
Super User

In that case, you make a measure that checks all the other columns except one, then apply that as the filter on the slicer for that column.  

In my example I made 4 meausres to check columns on a customer table

Gender

Education

Occupation

Marital Staus

jdbuchanan71_0-1731504427266.png

I make a measure like this:

ABC = 
VAR _A = INT ( ISFILTERED ( Customer[Gender] ) )
VAR _B = INT ( ISFILTERED ( Customer[Education] ) )
VAR _C = INT ( ISFILTERED ( Customer[Occupation] ) )
RETURN ( _A + _B + _C )

This gets applied to the D slicer (Marital Status) as a visual level filter

jdbuchanan71_5-1731504700515.png

 

If I select a value in 2 of the other slicers (any 2) it blanks ount the D slicer:

jdbuchanan71_2-1731504548716.png

You make a measure for each slicer that checks all the other columns and set the same filter.

For the A slicer, the measure is

BCD = 
VAR _B = INT ( ISFILTERED ( Customer[Education] ) )
VAR _C = INT ( ISFILTERED ( Customer[Occupation] ) )
VAR _D = INT ( ISFILTERED ( Customer[Marital Status] ) )
RETURN ( _B + _C + _D )

It check the other 3 columns.  And the filter you apply to the A slicer is this:

jdbuchanan71_3-1731504641250.png

So when I select somthing in B and C, the A and D slicers are blanked out.

jdbuchanan71_6-1731504778069.png

 

 

 

 

 

 

Works perfect! Thanks @jdbuchanan71 !

Boykins84
Frequent Visitor

@jdbuchanan71  thanks for the reply! This is helpful, but I realize I wasn't completely clear about the issue.

I need each combination to work independently. For example, if I select A and C, then B and D should be blocked. If I select A and D, then B and C should be blocked. Essentially, all combinations should be possible.

jdbuchanan71
Super User
Super User

@Boykins84 

You can extend @OwenAuger solution by combing the check on A and B into a single check, then you would apply that as a filter on the the slicers for C and D.

A and B filtered = 
VAR _A = INT ( ISFILTERED ( 'Attribute A'[Attribute A] ) )
VAR _B = INT ( ISFILTERED ( 'Attribute B'[Attribute B] ) )
RETURN _A * _B

If there is a filter on both A and B, this measure will return 1, if there is not a filter on both, it will return 0.

Then you set a visual level filter on the C and D slicers for [A and B filtered] is not 1.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors