Have you ever tried to display your North American or European states on a map only to find that one or more of them have suddenly moved to Latin America or Africa? I know that I run into this issue all the time. In this video I will give you two strategies to make the problem go away.
In the video, I am using the Microsoft AdventureWorks sample PBIX file that you can download here: https://aka.ms/dax-docs-sample-file .
The two strategies are the following:
- Add the Country attribute in the location box of the map above the State attribute which will allow you to then drill down to the state level and your states will now respect the country boundaries.
- Create a new column that concatenates state name and country name and categorize it as place.
State = Customer[State-Province] & ", " & Customer[Country-Region]
Either of these two strategies work, but I often find myself using the second one as it gives me more flexibility when I need to analyze data that has different geospatial levels in the same column in my model.
Before (please note a French state of Nord located in Africa):
After (Nord is now where it’s supposed to be – Northeast of France):