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

Dynamically Calculated Column as Legend based on multiple slicer selections

Hi everyone,

I need some help, I was struggling to find a way to concatenate multiple columns either in an import or direct query mode, to add it as legend in a line plot. I give you an example

 

I have Region, Country, Area slicers that comes from a unique table with also the indicators per days; in order to compare indicators per selection we need in case just Region is selected, the lines with legend just with Regions, but in case I select Area the legend would change based on a Region-Area column, on the other hand if I select more than one value in each three slicers , the legend will change as a concatation of these three columns. As my initial proposal was using  5 buttons and marks,but it wasn't intuitive for users.

 

Please let me know if there a way to do this without the use of marks and buttons, Thanks in advance.

 

 

 

1 ACCEPTED SOLUTION
pranit828
Community Champion
Community Champion

HI @Anonymous

It is not possible to change the Axis based on the filter selection.

 

You might like to start looking into possiblity of using bookmarks. Very interesting topic.

https://www.youtube.com/watch?v=_Afcj8mT5_Q





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

It couldn't achieve that use a dynamically Calculated Column as Legend in power bi for now.

For your case, I would suggest you unpivot the Region, Country, Area columns in fact table.

https://radacad.com/pivot-and-unpivot-with-power-bi

Then you will have two columns: Attribute and Value. now drag Value into Legend and drag Attribute and Value to a slicer together as a hierarchy slicer.

 

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pranit828
Community Champion
Community Champion

HI @Anonymous

It is not possible to change the Axis based on the filter selection.

 

You might like to start looking into possiblity of using bookmarks. Very interesting topic.

https://www.youtube.com/watch?v=_Afcj8mT5_Q





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

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.