Forum Discussion

Erik_VM's avatar
Erik_VM
New Member
3 years ago
Solved

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 visua...
  • PhilipTreacy's avatar
    3 years ago

    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.

     

     

    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