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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Create interactive slicer

Hello, I'm new to PowerBI and wasn't quite sure what to look for when looking for a solution to this problem. So feel free to point me in the right direction in case this question has already been answered before.

 

Lets take some sample data to illustrate my question:

ProductCategory

1

Cat.A
2Cat.A
3Cat.A
4Cat.B
5Cat.B
6Cat.B

 

Given this, I want to have two slicers at the top of my dashboard. One to select whether a user wishes to filter on specific products or categories. And the second one to actually make the selection. The items in the second slicer should change based on the selection made in the first slicer.

 

Thank you!

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hello @SSchepers ,

In my test, you need to create two other tables for slicers, then use the following formula:

Measure =
SWITCH (
    SELECTEDVALUE ( 'Slicer options'[Wish to filter?] ),
    "Yes", IF ( MAX ( 'Table'[Product] ) IN ALLSELECTED ( 'forSlicer'[Product] ), 1 ),
    "No", 1
)

After applying the measurement to the filter panel (set "is 1"), My display looks like this:
10.29.5.1.gif

Here's the pbix file.

Have I answered your question? Please mark my answer as a solution. Thanks a lot.
If not, load some insensitive data samples and expected output.

Best regards
Eyelyn Qin

amitchandak
Super User
Super User

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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