Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
lcfaria
Helper II
Helper II

Wrong map location with custom shape map

Hello everyone,

 

I need help from the community.

 

I'm working with a custom shape map of Panama and I'm having trouble plotting cities with the same name.

PS: You can find the link to the pbix file below.

 

What is happening is, when I try to plot the city of Las Lomas in the province of Coclé, the map also plots this city in the province of Chiriquí, since there is also a city called Las Lomas in that province.

 

This is my data, it includes information about the province and district:

lcfaria_0-1722036528821.png

PS: I put here just these two examples, but my data is bigger.

 

Here is the result I'm getting, Las Lomas (blue marked below) is appearing in two different places:

lcfaria_1-1722036616343.png

 

Does anyone have any idea how I can resolve this issue?

 

I've tried concatenating the province, district, and city, but it doesn't seem to work on the Shape Map.

 

Link to the file: https://1drv.ms/u/s!At5JlMR_naI1goRQKuhR_rfRYiZEhg?e=ZM6diU

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

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.

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

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.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors