Reply
Erik_VM
New Member
Partially syndicated - Outbound

Map visualisation shows wrong country for countrycode GB

Hi

I am new to PowerBI, but has managed to make a very nice turnover report with Map visualisation

I have a customer tabel from Business Central with country codes. Unfortunately Power BI map visualisation translates the Business Central code GB (For Great Brittain) to Guinea-Bissau, and my turnover (on the map) ends up in West Africa.

How do I correct the Map to show Great Brittain instead ?

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Syndicated - Outbound

Hi Erik

 

Download example PBIX file

 

You will have to add custom columns in Power Query for the Country and Country code like so (or can be done in DAX if you like but you'll be pulling in data with PQ so may as well do it there) 

 

= if [Country] = "Great Britain" then "United Kingdom" else [Country]

 

 

for the Country Code

 

= if [Country Code] = "GB" then "UK" else [Country Code]

 

 

Giving this.

 

gbuk.png

 

Then delete the original columns and rename the new ones with the deleted column names

 

gbuk1.png

 

Set the Data Category for both columns to Country and you can then map data using with either the Country Name or Country Code

 

gbuk2.png

 

 

With all that said, you are right, the correct ISO standard code GB is for Great Britain and Guinea-Bissau is GW.  So it looks like these ISO codes are not implemented correctly in Power BI.

 

You can report this bug here

 

Issues - Microsoft Fabric Community

 

Regards

 

Phil

 

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

Syndicated - Outbound

Hi Erik

 

Download example PBIX file

 

You will have to add custom columns in Power Query for the Country and Country code like so (or can be done in DAX if you like but you'll be pulling in data with PQ so may as well do it there) 

 

= if [Country] = "Great Britain" then "United Kingdom" else [Country]

 

 

for the Country Code

 

= if [Country Code] = "GB" then "UK" else [Country Code]

 

 

Giving this.

 

gbuk.png

 

Then delete the original columns and rename the new ones with the deleted column names

 

gbuk1.png

 

Set the Data Category for both columns to Country and you can then map data using with either the Country Name or Country Code

 

gbuk2.png

 

 

With all that said, you are right, the correct ISO standard code GB is for Great Britain and Guinea-Bissau is GW.  So it looks like these ISO codes are not implemented correctly in Power BI.

 

You can report this bug here

 

Issues - Microsoft Fabric Community

 

Regards

 

Phil

 

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

Syndicated - Outbound

@Erik_VM 

 

Change GB to UK.  The correct full name for the country is the United Kingdom of Great Britain and Northern Ireland.

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Syndicated - Outbound

Hi Philip

Your solution is of course obvious, but in reality Busines Central codes cannot be changed. BC is one of the biggest ERP solutions in the world and I wonder why they would choose a code that is not right. If I google country codes GB is meant for Great Brittain.

Is there a way to transform the data entry "GB" to "UK"  from BC when the customer tabel is loaded in PowerBI. I suppose PowerBI will identify UK as Great Brittain ?

Br Erik

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)