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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Slicer to select legend variable

Does anyone know of a way to use a slicer to select which variable is used as a legend.


For example, if I want to show population stats, split by age, region or sex at the moment I need 3 donut charts, one for each grouping variable. What I want to be able to do is just have one donut chart and then enable the user to select which of the three variables the data is grouped by.

1 REPLY 1
DataInsights
Super User
Super User

@Anonymous,

 

See the article below. The concept is to create a disconnected table that contains the three groupings (age/region/sex), and create a SWITCH measure that chooses the appropriate measure to display based on the user's selection.

 

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors