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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
nbcholst
Frequent Visitor

Using a slicer to choose between a subset of options

I have a column with 3 potential values: A, B, and C

 

I want to create a slicer that allows a user to choose whether or not to include B or C, but *always* includes A.

 

Is this possible? Are there any "hacks" to getting this done?

6 REPLIES 6
v-yulgu-msft
Employee
Employee

Hi @nbcholst,

 

It looks like you want to set "A" as a default selection of slicer. However, it is not possible to force a specific value as default selection.

 

You could submit this idea at this page.

 

Regards,

Yuliana Gu

 

 

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dramus
Continued Contributor
Continued Contributor

You can set the default. Select it in the slicer and then save the report.

dramus
Continued Contributor
Continued Contributor

I can think of a cludge.

 

force the A value using a page filter. Then remove it from the filter using s visualization filter, leaving just the B and C.

 

"force the A value using a page filter. "

Can you explain what this means? I don't know how to make it mandatory that a page shows a value,

 

As far as I know a slicer will just stack on top of the page filter - if the visualization slicer just selects B & C, then including A in the page filter won't force it onto the visualization.

dramus
Continued Contributor
Continued Contributor

My response last night was from my head. I tried it this morning in PBI Desktop and it didn't work out as I thought it would.

 

However! I did manage to get it to work another way. I don't know how feasible this will be (it will depend on how many items you have in your slicer.

 

I created a data table:

 

Data Table.PNG

 

A Slicer lookup table

 

Slicer Table.PNG

 

And a table of just the keys to join this many-to-many together

Key Table.PNG

 

The end model looks like this

Joins.PNG

 

Then created a table visualisation for the Data table and used the Slicer field from the Slicer table on a Slicer

Report.PNG

I can email you the PBIX file is you would like it. PM me.

This is a brilliantly simple solution and I just used it to solve a similar problem. Thanks!!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors