Forum Discussion
Wrong map location with custom shape map
- 2 years ago
If you 'View Map Type Key' in the shapemap options-> Format visual, you'll find a unique code in there on each row.
You have to get that unique code in your data too, so that powerbi can work out how to link your data to the shapemap's keys.
So find yourself a csv file of unique codes, provinces, districts, cities and use Power Query to merge that unique code into your data. It's best to make it a text field if I remember correctly.
Once you've done that, put the code in the Location field well and powerbi should find the correct area.
If you 'View Map Type Key' in the shapemap options-> Format visual, you'll find a unique code in there on each row.
You have to get that unique code in your data too, so that powerbi can work out how to link your data to the shapemap's keys.
So find yourself a csv file of unique codes, provinces, districts, cities and use Power Query to merge that unique code into your data. It's best to make it a text field if I remember correctly.
Once you've done that, put the code in the Location field well and powerbi should find the correct area.
Hi HotChilli
Thank you for your response.
Yes, I noticed that, but unfortunately, there was no unique field, except for some automatically generated IDs.
So basically, what I did was create a new attribute in QGIS where I concatenated province, district, and city. Then, I did the same in Power BI, and that solved the problem.
But the logic was really about having a unique identifier in the Map Key.
Thanks for your help.