Forum Discussion

Chamitha's avatar
Chamitha
Regular Visitor
7 months ago
Solved

How to display a text column as a label on Azure Map when plotting by Lat/Long?

Hi everyone,

I am using the latest version of Power BI Desktop. I have a data table with 3 columns:

  • Facility_Name

  • Latitude

  • Longitude

 

I want to do something very simple: plot a dot at the exact coordinates and permanently display the "Facility Name" right next to it on the Azure maps.

 

Right now, when I plot the Lat/Long and turn on Category Labels, it displays the raw GPS coordinates instead of the text name. If I try to force the Facility Name into the "Location" field while using Lat/Long, the visual throws an error.

How can I get the map to plot using the exact coordinates but use the Facility Name for the permanent floating text label? Is there a native trick for this, or do I need a custom visual?

Thanks!

  • Thanks for the explanation! That makes perfect sense regarding why it needs a scalar value like an average.

    I actually found a very simple workaround for this where you don't even need to manually change the aggregation. It turns out the order in which you drag and drop the fields completely changes how Power BI handles the data.

    Here is the exact sequence that worked for me:

    1. Drop your text field (Facility Name) into the Location bucket first.
    2. Drop the Latitude field into the Latitude bucket.
    3. Drop the Longitude field into the Longitude bucket.

    By establishing the text category in the Location bucket before introducing the numbers, Power BI accepts the raw coordinates without throwing an error, and the text labels display perfectly next to the dots.

    Thanks again for pointing me in the right direction!

4 Replies

  • Hi Chamitha 

    If you use the geo-coordinates together with the location, the geo-coordinates must return a scalar value (aggregated, usually average). If you don't do this, you won't be able add a field to the location tile.

  • RicardoTraNa's avatar
    RicardoTraNa
    Icon for Responsive Resident rankResponsive Resident

    Hi!! This is a common limitation of the Azure Maps visual... and unfortunately what you’re trying to do is not fully supported natively today.
    The best workaround is use longitude, latitude and Name (put in on your legend field). 

    Then in the visual:

    • Format > Category labels > On

    • Layer > Bubble layer (not heatmap). 

    Hope that help!! 

     

  • Chamitha's avatar
    Chamitha
    Regular Visitor

    Thanks for the explanation! That makes perfect sense regarding why it needs a scalar value like an average.

    I actually found a very simple workaround for this where you don't even need to manually change the aggregation. It turns out the order in which you drag and drop the fields completely changes how Power BI handles the data.

    Here is the exact sequence that worked for me:

    1. Drop your text field (Facility Name) into the Location bucket first.
    2. Drop the Latitude field into the Latitude bucket.
    3. Drop the Longitude field into the Longitude bucket.

    By establishing the text category in the Location bucket before introducing the numbers, Power BI accepts the raw coordinates without throwing an error, and the text labels display perfectly next to the dots.

    Thanks again for pointing me in the right direction!

  • v-echaithra's avatar
    v-echaithra
    Icon for Community Support rankCommunity Support

    Hi Chamitha ,

    Thank you for confirming that issue has been resolved. If further assistance is still required. We are available to support you and are committed to helping you reach a resolution.

    Best Regards,
    Chaithra E.