Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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.
Solved! Go to Solution.
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.
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.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |