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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
JemmaD
Helper V
Helper V

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
Helper V
Helper V

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
Helper V
Helper V

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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