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

How to make this behaviour in a Slicer

Hi, Im trying several options to do this:

I have a column (category) that has values like 'cat 1, cat 2, cat 3, etc' I want a slicer that has the options: cat 1 and "All".

If I select cat 1, then the dataset will filter only those rows with category = cat 1, if I select All then no filter is applied.

 

Is there any way to acomplish this? 

Thanks for your help!

 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create a new table,

Table 3 = FILTER(VALUES('Table 2'[product]),[product]="a")

Create relationship

Capture3.JPG

Add filter

Capture4.JPGCapture5.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
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

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create a new table,

Table 3 = FILTER(VALUES('Table 2'[product]),[product]="a")

Create relationship

Capture3.JPG

Add filter

Capture4.JPGCapture5.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

You can turn on "show all" option in Format->selection control for a default slicer.

"all" in slicer always means to show all values instead of applying any filter.

 

Best Regards

Maggie

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks, I know that I can activate the option "show all" the problem is I dont want to show in the slicer all the categories, I want to show only category 1 and the "show all" option, the slicer should not act as a filter the other categories that dont appear, only just hide them in the slicer

amitchandak
Super User
Super User

@Anonymous , not sure what you want here. this is the default behavior of slicer.

 

In case it is disconnected slicer, then you can use is filtered

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

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.