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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mromerorod
Regular Visitor

Legend filter with swiched visuals

Hello, 

 

My client is asking for a dashboard similar to the one below, where displayed values are dependent on a value selected via a button.

Instead of managing between various bookmarks (this is applied for several dashboards), I have followed the approach described here (Dynamically change the information within a visual via a slicer - oxcrx34285), which is switch fine between the both sets of values. 

The problems arises when I apply the [Category] column in the chart Legend. If I display each Measure individually, the filtering by category is done correctly. But, when displaying the measure containing the SWITCH() function, the value displayed for each category is the same (the total result). For example, in the Gross Cost chart, as Axis-Y I put my SWITCHMEASURE, and for Nov-24 it will show an equal value of 10 for all categories.

 

Any idea how to keep the Legend filter working correctly?

Thanks!

 

mromerorod_0-1736876456325.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You will want to use Field Parameters for this. Much easier to work with, and works well with measures too.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

You will want to use Field Parameters for this. Much easier to work with, and works well with measures too.

Thank you! By chance I came across a user article this morning that mentioned Field Parameters as being the go-to solution for value-switching in a chart. I am quite new to Power BI, but I feel documentation is not that clear on the functionality of each component. 

I saw that field parameters support columns but not standard operations on them (sum, avg, etc). Do you know if this is something possible? As that would be the ultimate, hassle-free solution for value-switching, avoiding the need to calculate intermediate measures.

Thanks again!

Field Parameters also work with measures. Try it out.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors