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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
DanH
New Member

How to define MAP KEYS in custom shape file

I have created a custom SHP file from scratch (using QGIS), then converted to TopoJSON using MapShaper.org.

 

Add a Shape Map visualization to my report, and choose custom map, and find my TopoJSON file on disk.

The shapes show correctly in the widget. 

 

After adding a data column to the Color Saturation well, nothing shows in the map.  

 

I suspect the Map Keys are not correct.  When clicking on "view map keys" nothing shows.  For all other map types (built in and downloaded, created by others), a dialog shows the keys that can be used to correlate to the regions in the map.

 

What do I have to add or do in the SHP file (in QGIS) to add map keys such that they can be used in the Power BI desktop visualization? 

 

Thanks everyone.

 

1 ACCEPTED SOLUTION
CatAttack
Regular Visitor

Hi Dan,

I'm in the middle of a similar project and hit the same wall yesterday. Make sure when you convert from shape file to json in mapshaper that you load all of the resulting files from QGIS before the export--filename.shx, filename.shp, filename.qpj, filename.prj, filename.dbf, etc.

Hope this helps, Carrie

View solution in original post

5 REPLIES 5
CatAttack
Regular Visitor

Hi Dan,

I'm in the middle of a similar project and hit the same wall yesterday. Make sure when you convert from shape file to json in mapshaper that you load all of the resulting files from QGIS before the export--filename.shx, filename.shp, filename.qpj, filename.prj, filename.dbf, etc.

Hope this helps, Carrie

Thank you for that tip.  Did not realize you can/should add multiple layers.  In addition to the SHP, I added the DBF.  It does not do anything visually to what's showing in the mapshaper UI, but when converting to TopoJSON, it now contains the data fields I was looking for.

Mrecords
Frequent Visitor

Hi, 

 

I converted a shapefile to topojson using mapshaper.org.  Now if I click on PowerBi under Format-->map-->view map keys it opens a map keys table where I can see all attributes. But on Fields-->location I can only choose between two fields (Name and Value) which are not the fields I have on the map keys table.

How do I get to use the field I want from those I see on the map keys (district_code for example)?

 

Thanks

Mrecords, did you ever figure this out?  I'm in the same boat, good geometry and I can see the keys via "View map keys" under the shape map visualization/format/shape, but I want to be able to see the keys in the table (so I can set up relationships) and see as tooltips

kbuck
Frequent Visitor

So I did some poking around some more and found this video on this Power BI Community Post about editing the query of the TopoJSON file you pull into Power BI.  You then set up relationships and your data and your layer are linked!

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.