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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mromerorod
New Member

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors
Top Kudoed Authors