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
jj891955
Regular Visitor

dynamic map legend based on two columns

Hello,

 

I am new to PowerBi and I am struggeling with the idea of a dynamic legend for my map visual. I have a table like this with store ID, regional and area managers, and latitude and longitude for the stores. In fact there are like 10 region managers and about 40 area managers for approximately 2000 stores in my table.

Unbenannt.png


When I use a map visual and add the latitude and the longitude to the fields, my stores are correctly shown on my map. When I put the region manager column in the legend field the store are colorized accordingly (e.g. red for bob, green for mary), so all stores related to one region manager have the same color.

 

I also have a slicer, in which I put the region manager and area manager fields to select the stores to be shown in my map visual. When I select Bob it correctly shows only the stores which are related to bob (or to the area managers john and anna) as red bubbles, because the region manager column is in the legend field and bob's stores are all shown as red bubbles.

 

Now I want to have a dynamic map legend which changes from showing colors for the region managers to colors for the area managers when only one region manager is selected in the slicer. When multiple are selected there shall be no change and the region managers are still shown. I want to keep the slicer in the mode where it shows the region and area managers in depending lists as a dropdown. I also do not want to use a second slicer visual.  

 

I tried to create a measure to return the values of the column I need when I select something in the slicer, but I can not add a measure into the legend field of the map. I saw several solutions for other problems regarding a dynamic legend, but I was not able to adapt them to my specific problem.

  • Some solutions wanted to show dynamic legends in chart visuals using a transparency measure. The map visual is always rendered and the measure does not work here.
  • Another suggestion was to use bookmarks and buttons, but then I would need to create several bookmarks for every region manager and this is not at all a dynamic approach. When a region manager is added, my report is broken (or do I misunderstand something?).

 

Can someone explain I can achieve this?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

That's not something you can do in the current version of Power BI. Raise an idea if this is important to you.

View solution in original post

2 REPLIES 2
jj891955
Regular Visitor

Thank you. After a lot of searching I gave it up and redesigned the report.

lbendlin
Super User
Super User

That's not something you can do in the current version of Power BI. Raise an idea if this is important to you.

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.