cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DanH Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Highlighted
CatAttack Visitor
Visitor

Re: How to define MAP KEYS in custom shape file

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
Highlighted
CatAttack Visitor
Visitor

Re: How to define MAP KEYS in custom shape file

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

DanH Frequent Visitor
Frequent Visitor

Re: How to define MAP KEYS in custom shape file

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
Frequent Visitor

Re: How to define MAP KEYS in custom shape file

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

kbuck Frequent Visitor
Frequent Visitor

Re: How to define MAP KEYS in custom shape file

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
Frequent Visitor

Re: How to define MAP KEYS in custom shape file

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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 162 members 1,826 guests
Please welcome our newest community members: