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
pt001
New Member

Dynamic Legend?

Hello,

 

Is it possible to enable the viewer of a report and/or dashboard tile to dynamically change the legend? For instance, let’s say I have a pie chart of client interactions. I know how to enable the user to filter the report by the year in which the interaction occurred, but I’d like the pie chart to display the results (i.e. pie slices) by salespersons if the viewer wishes or to display the results (i.e. pie slices) by the region of the clients if the user prefers that instead. Is that possible to do in one report/chart, or do I need to create a separate report/chart for each legend I want to make available?

 

Thanks!

Patrick

4 REPLIES 4
PowerDAX
Resolver III
Resolver III

Hey Patrick, this is not too difficult but the feasibility depends on the size of your data.  The Power Query functionality makes it a

lot easier though.  Here is a great writeup example of doing just that:

 

http://sqljason.com/2013/01/row-selection-using-slicers-in.html

 

You can also make your measure dynamic based on selection:

 

http://sqljason.com/2012/11/measure-selection-using-slicers-in.html

powerdax.com

Thanks PowerDax!!! I think the link regarding making the measure dynamic based on selection is what I'm after. I previously accomplished such functionality in Excel using a dynamic dropdown that when changed would trigger the VB to adjust the chart accordingly. I'm admittedly a novice at Power BI. How would I go about adapting the informaiton in your link to Power BI?

 

Thanks again,

Patrick

Nice solution PowerDax!

TealCanady
Advocate II
Advocate II

Patrick,

 

It is what I would call Semi-Possible. I would setup the sales person as the next level of the hierarchy in the pie; then instruct the end user to click on the double down area in the left hand corner of the chart (without any slice highlighted). This will drill all the data down to sales people and make the legend be sales people instead of client interactions. Where you might run into trouble is that they have to have a client interaction to show up in the next level of the chart; so be wary of blanks etc. and make sure to account for this in your filtering.

 

Teal

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.