Forum Discussion

Beto_Zambom's avatar
Beto_Zambom
Frequent Visitor
7 months ago
Solved

Power BI Azure Map

Hi,

I’m trying to create a map in Power BI to display all the machines we have in Australia. We have a column called CompanyAddressLong, which contains the full address, postcode, and city.

However, when I use CompanyAddressLong in the map visual, some locations are appearing in the US instead of Australia.

Did I miss something in the setup, or is there a configuration I need to change to tell Power BI that all these addresses are located in Australia?

  • Just a follow up to close this forum. I change to ArcGis map and with the address all points went to the right location. So this was the solution in the end. 

8 Replies

  • Hi Beto_Zambom 

     

    Split the address into fields
    Create separate columns and set Data Category correctly
    CompanyCountryCode → Country/Region
    CompanyPostalCode → Postal Code
    CompanyCity → City
    Then place Country + Postal Code + City in the map (not the long address string)

     

    or

     

    Use Latitude / Longitude (most reliable)

    Pre-geocode addresses (Azure Maps, Google, etc.)
    Store Latitude / Longitude = we can get these based on city/country from internet if client won't provide us
    Use those fields in the map


    Please mark it as a solution with headup if this helps you. Thank You!

  • Right now Power BI is trying to interpret CompanyAddressLong as a global address. If parts of the string (city name, street, or postcode) also exist in the US, Azure Maps may resolve them there. To solve:

     

    1. Create a column:

      • Country = "Australia"

    2. Set Data Category:

      • Country → Country/Region

      • City → City

      • Postcode → Postal code

      • Address → Address

    3. In Azure Map visual, place:

      • Country → Country

      • Address or City → Location

    This forces Azure Maps to resolve everything inside Australia.

  • Hi Beto_Zambom 

    Using addresses instead of latitude and longitude isn’t ideal in Power BI maps. Address-based geocoding can be ambiguous, especially when multiple places share the same name. Even with the country defined in the hierarchy, Power BI may still plot the location in a different country if the geocoding service resolves it incorrectly.

    Providing latitude and longitude avoids this issue entirely, as coordinates uniquely identify a location and ensure accurate plotting in Azure and Bing Maps.

     

    • Beto_Zambom's avatar
      Beto_Zambom
      Frequent Visitor

      I understand about the Lat x Long but unfortunatelly that data is not possible to have it

  • AshokKunwar's avatar
    AshokKunwar
    Continued Contributor

    Hii Beto_Zambom 

     

    When using a single string like CompanyAddressLong, Power BI's geocoding engine searches globally. If a street name in Australia also exists in the US, the map may default to the US location if it has a higher "search relevance" in the Bing database

    The Solution: 3 Steps to Lock Locations to Australia

    Step 1: Set Data Categories

    ​You must tell Power BI exactly what each column represents. This is the most common step users miss.

    1. ​In the Data pane, select your CompanyCountryCode column.
    2. ​Go to the Column tools tab in the top ribbon.
    3. ​Click the Data Category dropdown and select Country/Region.
    4. ​Repeat this for CompanyCity (set to City) and CompanyPostalCode (set to Postal Code).

    Step 2: Create a Geographic Hierarchy

    ​Creating a hierarchy forces Power BI to look at the address "inside" the city, and the city "inside" the country.

    1. ​In the Data pane, right-click CompanyCountryCode and select Create hierarchy.
    2. ​Right-click CompanyCity and select Add to hierarchy -> CompanyCountryCode Hierarchy.
    3. ​Add CompanyAddressLong as the final level of that hierarchy.
    4. ​Use this Hierarchy in the Location field of your Map visual instead of the single address column.

    Step 3: Add "Australia" to the Address String (Optional but Highly Effective)

    ​If you still see issues, create a calculated column that explicitly appends the country name to every address.

    MapAddress = 'Table'[CompanyAddressLong] & ", Australia"

     

    Set the Data Category for this new MapAddress column to Address.

    Why this works:

    • Contextual Geocoding: By categorizing the Country column as "Country/Region," you provide a global filter for the Bing Maps API.
    • Hierarchy Priority: When you use a hierarchy, Power BI passes the country and city context along with the street address, eliminating ambiguity with US street names.

    Summary for the Community

    ​The map visual needs geographic context. Always categorize your columns under Column Tools and try to include a "Country" field in your visual's Location bucket to anchor the geocoding to a specific part of the world.

    If this configuration fixes your map locations, please mark this as the "Accepted Solution" to help others with similar mapping issues!

    • Beto_Zambom's avatar
      Beto_Zambom
      Frequent Visitor

      Hi AshokKunwar 

       

      I did all you asked for:

      1. CompanyCountryCode -> Contry/Region

      2. CompanyCity -> City

      3. CompanyPostalCode -> Postal Code

       

      Create also Geographic Hierarchy

      Also the new column MapAddress

      MapAddress = 'FactDataTotalSprayers'[CompanyAddressLong] & ", Australia"

      The map a little bit better, but now 3 points still on US and 1 in Europe:

       

       

      The interesting is this data set, with all other countries (I just have a part of the data only australia) do not have that error when they add the CompanyAddressLong. 

       

       

      • Beto_Zambom's avatar
        Beto_Zambom
        Frequent Visitor

        Just a follow up to close this forum. I change to ArcGis map and with the address all points went to the right location. So this was the solution in the end. 

  • AshokKunwar's avatar
    AshokKunwar
    Continued Contributor

    HII Beto_Zambom 

     

    If this configuration fixes your map locations, please mark this as the "Accepted Solution" to help others with similar mapping issues!