Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Azure Maps visual - Pie Chart using latitude/longitude

Hi all,

My company is internally disabling the Bing Maps visual due to privacy issues. All map visuals showing points on a map should be using the Azure Maps visual from May 2023 onwards. I want to replicate a Pie Chart map which we had in the previous version in the Azure Maps visual, but it seems that this only works with the location field, but not with the latitude/longitude fields. We are using custom regions (NUTS3, ADM2) rather than the built-in regions so I would have to use lat/lon.

Add a pie chart layer to an Azure Maps Power BI visual - Microsoft Azure Maps | Microsoft Learn

What I get with Azure Maps now is only bubbles of the different categories overlaid on top of each other rather than the pie chart...

Would anyone know if and how my old Pie Chart map from the Bing Maps visual can be re-created in the Azure Maps visual using latitude and longitude? Maybe I am just doing something wrong.

Thanks

Bubbles for categories on top of each other instead of pie chartsvisual settings

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Alex, I had the same issue recently, and the way to solve it was:

    1.  Create a calculated field that contains latitude and longitude:
      1. Latitude and Longitude = Table[Latitude] & ", " & Table[Longitude]
    2. Place the fields in the Azure object as follows:

     

    • Location: Latitude and Longitude
    • Latitude: Average Latitude
      Longitude: Average Longitude
    • Legend: Data Category (in my case, it's "Category")
    • Size: Measure you use to determine the size of the bubbles.

     

    With that, it should work.

     

    (on the left is the Azure map, on the right is previous standard map version)

     

    My explanation of why this works is: By placing the calculated field in the location, we are adding a data point that is at the same granularity level as latitude and longitude. Then, when you point to the locations on the map (using latitude and longitude), the map can correctly position the points and distribute them based on your measure for the pie chart proportion.

    I hope this is helpful!

    Regards!