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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
bssdon
Regular Visitor

Displaying multiple-select questions on map legend

I have data that comes from a multiple-select question that is stored in multiple columns like in the table below

Category of incidenceCategory of incidence/electricity offCategory of incidence/Flooded roadCategory of incidence/fallen treeCategory of incidence/leaning utility poleCategory of incidence/roof leakingCategory of incidence/partial house collapseCategory of incidence/otherLatitudeLongitude
Electricity off flooded road1100000  
fallen tree leaning utility pole electricity off1011000  
Partial house collapse0000010  
roof leaking electricity off1000100  
roof leaking flooded road other0100101  

 

I currently have the Category of Incidence field as the legend, but that ends up eventually being all possible permutations of all the categories. Like this

bssdon_0-1738947769411.png

Is there any way that I can have a legend of one of each category like

  • Electricity off
  • Flooded Road
  • Fallen tree
  • Leaning Utility Pole
  • Roof leaking
  • Partial House collapse
  • Other

And make it so that clicking on one highlights all points on the map that contain that category? is that possible?

1 ACCEPTED SOLUTION

Thank you very much! The link to the discussion with the similar issue helped immensely. Specifically the video that the user linked https://www.youtube.com/watch?v=rI0uHdBwgPY 

 

To summarize, I had to add the Category of Incidence as a new query (and add an index column), split it into columns, then unpivot all columns except for the index.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@bssdon you need to unpivot your data to make it work, what would be on the x-axis?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I have another column for Location for the x-axis. How would I accomplish this? When I try unpivoting the columns it multiplies the number of rows. Apologies as I'm new to this.

Hi @bssdon ,

Thank you for your kind reply!

What does all the data you have look like? Could you please describe in more detail the output you expect to get? It's normal for you to mention "When I try unpivoting the columns it multiplies the number of rows. ", We need more information to offer you more help! 

Could you please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

In addition, someone else had a similar issue like yours before, you could check out the link, hopefully it will help you have more ideas.

Solved: Visual-level filters not working - Microsoft Fabric Community

Best regards,

Lucy Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much! The link to the discussion with the similar issue helped immensely. Specifically the video that the user linked https://www.youtube.com/watch?v=rI0uHdBwgPY 

 

To summarize, I had to add the Category of Incidence as a new query (and add an index column), split it into columns, then unpivot all columns except for the index.

Hi @bssdon ,

I am happy to learn that you found the cause of the problem and fixed it.

Could you please accept your own reply or my reply as a solution, it will make it easier for other users who may be experiencing the same problem to find a solution.

Thank you for your understanding!

Best regards,

Lucy Chen

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors