Forum Discussion
Microsoft Azure's map can identify incorrect postal codes - where data?
- 8 months ago
Azure Maps geocoding is a black-box service: Power BI sends your location fields to the geocoder and gets back coordinates. Microsoft/Azure doesn’t publish the full country+postal reference dataset used for geocoding, and Power BI doesn’t expose it.
What you’re seeing is normal geocoder behavior: if the postal code is invalid for the supplied country (or the country hint isn’t applied strongly enough), it may fallback and resolve the postal code somewhere else (often the US if it’s a valid US ZIP).
Practical ways to reduce wrong matches:
Use the correct field category: set Country to Country/Region and Postal to Postal code.
Prefer 2-letter ISO country codes (AT) over 3-letter (AUT) if possible; some geocoders handle them more reliably.
Add more context (City/State/Region) so the geocoder has less ambiguity.
Best: bring your own lat/long (or a reference table that maps valid postal+country to lat/long) and plot by coordinates. That bypasses geocoding entirely.
Hi DouweMeer
1.Concatenate Country + Postal code for unique keys
dax
Create a calculated column in your data
LocationKey =
[Country_Code] & "|" & [Postal_Code]
// Or for display purposes
DisplayLocation =
[Country_Code] & " - " & [Postal_Code]
2. Use Latitude/Longitude Instead
The most reliable solution is to geocode your data beforehand
Power Query Geocoding (using external API)
powerquery
// Add column using Bing Maps or Google Maps API
= Json.Document(Web.Contents("https://dev.virtualearth.net/REST/v1/Locations/" & [Country] & "/" & [PostalCode] & "?key=YOUR_KEY"))
3. Custom Shapefiles with Correct Boundaries
Create custom maps with correct country-postal code associations.
4. Azure Maps Data Source Configuration
If using Azure Maps directly (not Power BI's built-in), you can
Create a dataset in Azure Maps with correct postal codes
Use the countrySet parameter to restrict searches
Please mark it as a solution with headup if this helps you. Thank You!