Forum Discussion

pelowski's avatar
pelowski
Helper III
1 year ago
Solved

Map Visual not color coding Peru

I have a table with ISO 3166-1 Alpha 3 codes that is mapped to Sales Regions.  When the Alpha 3 code is mapped to the "Location" field, the value for PER is not recognized as Peru.  This is true both...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi pelowski ,

     

    Thanks for lbendlin reply, that's really helpful!

     

    pelowski This is how the Location option is explained in the documentation: "The Location option must contain a valid value for Power BI to create the filled map. Valid locations include countries/regions, states, counties, cities, zip codes, postal codes, and so on". Create and use filled maps (choropleth maps) in Power BI - Power BI | Microsoft Learn

     

    In my test, when I put Peru's Alpha-3 code into Location, the region couldn't be correctly identified. So, I recommend you create a custom column with Switch DAX to get entrie country names if the data doesn't contain too many countries.

    CountryName = SWITCH('Table'[alpha-3],"PER","PERU",...)

     

    Another method is to download a CSV file which has country names against these codes. Then map the corresponding full country name to your data.

     

     

     

    Best regards,

    Mengmeng Li