Forum Discussion
Map Visual not color coding Peru
- Anonymous1 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
Anonymous, thank you. This is a servicable workaround. But yeah, this seems like a bug because 99% of the other ISO codes work as expected. I'm not sure what you mean by "Another method is to download a CSV file which has country names against these codes". Are you talking about Microsoft's official supported list, because if so, I don't see that anywhere. My list is already in a SQL table I generated years ago and matches up against the ISO 3166-1 codes I see listed elsewhere.
lbendlin , yes I did that. If I didn't, I don't think think that experience would've looked like what I show in my video.