Forum Discussion
Map visualisation shows wrong country for countrycode GB
- 3 years ago
Hi Erik
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.
Then delete the original columns and rename the new ones with the deleted column names
Set the Data Category for both columns to Country and you can then map data using with either the Country Name or Country Code
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
Hi Erik
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.
Then delete the original columns and rename the new ones with the deleted column names
Set the Data Category for both columns to Country and you can then map data using with either the Country Name or Country Code
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