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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hassanwasef
Frequent Visitor

How can I locate Places on map using PostalCode

Hello, We have started using PowerBi for data visualization, We needed to view locations on power bi map, but all i have is postal codes of these locations.
the places are all located in Saudi Arabia, but the map locate their postal code in the USA. I guess this is because Postal codes are not unique across countries. but longitude and alatitude are not available  to use unfortunately, all i have is the name of the country and the postal code.. 
I have tried the combinations "PostalCode"+", CountryName" and it's inversoin. 
My question is how to combine these available data together to get the map locate the cities correctly? Thank you

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

I had the similar issue and this is how it was resolved:

 

1. make sure your Data category your fields is correct, you can set category in modeeling tab, select category "Country/Region
for your country field and set category "Postal code" for your postal code field.

2. on Map visual, drop Country and Postal field as shown below

country1.PNG

3. You will see drill down icon on your map visual, like below.

v1.PNG

4, Click Hierarchary drill down button and you will see your data in correct country/postal area

v2.PNG

 

 

 



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.

View solution in original post

12 REPLIES 12
Juliän
New Member

This Topic is not solved! In Germany we have similar problems.

German postcode 99734 -> Nordhausen in Thüringen, is from Bing Maps located in Alaska, that's makes no sense. And we have much more examples.

 

I categorized the data. I created hierachies, with country. I concatenated it with Country infront of postcode, nothing works.

 

Please fix that Bugs!

 

 

Anonymous
Not applicable

I'd like to suggest you to use a calculated column who contains detail address information to help map visual to accurate the location.

 

For example:

Place = [Postal Code]&","&[Country] 

 It worked in my case.

Hi there,

I just tried the solution above and wondered if this calculated column needs to assign a data category. Thanks in advance.

Kind Regards,

An answer to the question above: it doesn't require me to assign a certain data category for it, and making sure of the comma is between post code & country, then drag calculated column to 'Location' field on your map. Problem solved!
Many thanks,

hassanwasef
Frequent Visitor

Thank you @parry2k , @MattAllington , I will try this as a proof of concept. although, I have solved the issue using the cities names with the country name, separated by a comma . Even when the names are in Arabic. they were located correctly, I didn't expect it to  be working at first. 
Thank you.

parry2k
Super User
Super User

I had the similar issue and this is how it was resolved:

 

1. make sure your Data category your fields is correct, you can set category in modeeling tab, select category "Country/Region
for your country field and set category "Postal code" for your postal code field.

2. on Map visual, drop Country and Postal field as shown below

country1.PNG

3. You will see drill down icon on your map visual, like below.

v1.PNG

4, Click Hierarchary drill down button and you will see your data in correct country/postal area

v2.PNG

 

 

 



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.

Anonymous
Not applicable

one question here is, could I set the postcode colunm at begining as a 'Decilmal number' or 'Text?'

Anonymous
Not applicable

I have the similar issue and tried with you sugesstion but it isn't working for me.

 

Here is my sample data:

 

  Total Consumer  Postal code    Country

   53                     0901              Norway

 

I followed step 1 and 2 as suggested but when I drill down it shows location of Mozambique insted of Norway.

 

Any help is appreciated.

I agree with @parry2k however in my experience you don't need to put country into your visual.  You do need it in your table but not in the visual.



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington you need Country and Postal code in case you don't have lat/long otherwise if you have only postal code, map doesn't render the data correctly since postal code are not unique across the globe. I solved the problem by dropping country and postal code and then do hierarchary drill down.

 

Although lat/long is they way to go.

 

Cheers,

P



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 agree you need country.  I just don't think it needs to be in the visual. I have tested this with country in the table (along with post code) and both fields correctly stamped as the correct data type.  You definitely need it in the table,  I just don't think you need it in the visual (well that is my experience anyway).



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Thanks @MattAllington, I never tried without having country on the visual, will try. Thanks a lot.



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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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