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
Anonymous
Not applicable

Map visualization with country codes

Hi,

 

I'm trying to display on a map the number of lines of data linked to a particular country code. I am using the ISO Alpha 2 codes (France = FR).

I put my geoloc column in the location field, and it works for some countries (France, Netherlands, US).

But some others are misinterpreted (GB for Great Britain gets put in Grand Bahama, BE for Belgium is place on Berlin ...).

How can I tell Power BI that I'm using Country Codes ?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I want to give an update on how I solved this issue.

 

I used an Excel file that maps country codes to latitudes and longitudes, and imported it into my report.

I then just had to link the "Location" column from my data with the "Country Code" column of my Excel file, and use Latitude and Longitude on a map visualisation for it to work.

 

Thanks Smiley Happy

View solution in original post

4 REPLIES 4
v-qiuyu-msft
Community Support
Community Support

Hi jhyot,

 

In your scenario, it seems that some ISO Alpha 2 codes have wrong mapping to real countries. To correct correspondence, we can create a new query and define the mapping, then merge this query with the original query. For more information, please refer to this article: Mappings in Power BI.

 

If you have any question, please feel free to ask.

 

Best regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I want to give an update on how I solved this issue.

 

I used an Excel file that maps country codes to latitudes and longitudes, and imported it into my report.

I then just had to link the "Location" column from my data with the "Country Code" column of my Excel file, and use Latitude and Longitude on a map visualisation for it to work.

 

Thanks Smiley Happy

Hi jhyot,

 

Glad to hear that your issue had been solved by yourself. Thank you for your sharing which will help other forum members who have the similar issue. Smiley Happy

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous This tips and tricks page may help, but in general the power bi maps use Bing maps/geocoding. It isn't as intuitive as other mapping tools, so you may need to figure out the best way to alter the data on the backend so it recognizes the locations accurately.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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.