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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
JemmaD
Resolver II
Resolver II

Show or hide values in slicer based on selection

So I have a stacked line chart, and i've done some magic to have the legend and axis dynamically change based on whether the user has chosen between two categories. 

Once they've chosed one of the two categories to determine the x and y axis and the legend, the user can then select which measure they want to see on the chart. I added my measures to a parameter table to achieve this.

 

The problem is, half the measures apply to one category, and half apply to the other category. So at the moment all the measures are available in the slicer, and if the user picks a measure which doesn't relate to the 'Category' the chart looks silly. 

 

Can I do something to suppress the measures in the slicer? Or worst-case I could separate them into two parameter tables but I would still need to hide one or the other slicers based on 'Category' selection. 

1 ACCEPTED SOLUTION
JemmaD
Resolver II
Resolver II

I added a column to my parameter of 0 for category 1 and 1 for category 2, then added the same value to my 'Category' table and created a relationship between the two tables. Now, if Category 1 is selected, the only measures which appear in my selection slicer are those with a '0' next to them so it works perfectly.

View solution in original post

2 REPLIES 2
JemmaD
Resolver II
Resolver II

I added a column to my parameter of 0 for category 1 and 1 for category 2, then added the same value to my 'Category' table and created a relationship between the two tables. Now, if Category 1 is selected, the only measures which appear in my selection slicer are those with a '0' next to them so it works perfectly.

PVO3
Impactful Individual
Impactful Individual

I'm wondering what this kind of magic is that you're talking about.

Best way to let user dynamically switch measures, is by Calculation Groups. You might want to invest in getting used with these.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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