Forum Discussion
Pull custom shape map (topoJSON) keys into table or tooltip?
- 5 years ago
Hi Bonnie,
You can import your custom topojson file as a table and collect the values that way. Then you'll be able to use the key values in your visuals as well.
- go to getdata and choose the json source
- import your topojson file
- the tricky part, you have to navigate to the key information by expanding the records, and turning them into a table (check out a guide here: Using Power BI with JSON Data Sources and Files (mssqltips.com))
- create a relation between the geoid in the new geography table and the county column in the countyresemi table
Once the above steps are done you should have your new geography table ready for use with your other table.
Below you'll find an example of when I import a similar topojson file for Dutch municipalities.
good luck!
- Anonymous5 years ago
ha! got it! I just needed to head into the Relationships area and tell Power BI that these two tables are related by the FIPS code as the key. so a one-to-many relationship (I set cross filter to Both and checked make Active, for anyone else who winds up needing this solution). And ta-da! I was then able to drag County Name from the secondary table (extracted from the JSON as discussed above) into tool tips and Power BI mapped it all out quite nicely. Woo! Thanks everyone!
I think you'll have to get the county name into your data - it won't be picked up from the 'View map keys'. Should be reasonably straightforward if you can find some FIPS <-> county data
I guess you're right! I guess I was hoping there was a way to write a formula or some other clever feature of Power BI where it could see a table of FIPS + county names and match those up with other columns of data I select, rather than me having to go add that column to that giant data source...ah well!