Forum Discussion
Power BI Map - Sales Data
- 4 years ago
Anonymous
Grab the JSON files for the US census regions, add them to your shape, and you've got exactly what you need:
For US maps: https://github.com/d3/d3/wiki/gallery/#maps
(original source: https://community.powerbi.com/t5/Desktop/US-states-Shape-Map-JSON-file/m-p/79071)
This should resolve the problem 🙂
- 4 years ago
Anonymous check this link out: https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map
- 4 years ago
Anonymous it should be one of the following: https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html
Try one of the Nation or Region zips.
Cheers
Theo
- 4 years ago
Anonymous you may need to convert to JSON: https://www.statsilk.com/maps/convert-esri-shapefile-map-geojso
- Anonymous4 years ago
TheoC I am using a measure not pulling it from field pane. I went back to the original plan, brought in US States Geo Json file into power bi. Created a table with Census Division and States and linked it to the source data. I have below formula to calculate the average sum for each census divison. It worked for me ut hd to get creative. I couldnt have done without help of TheoC. Thank you!
POS Sales = var _currentCensus = MAX(Region[Census Division]) var _sum = SUM(Region[Values]) var _uniquestates = CALCULATE(DISTINCTCOUNT(Map[State]), Region[Census Division]=_currentCensus) var _calculation = DIVIDE(_sum,_uniquestates) return _calculation
TheoC In theory it works however how will i establish one to many relation. 1 census division may have 6 or 7 states listed under it and i dont have state level sales data. Sales data is at census region level.
I also have DMA data i wonder if there is way to plot based on that rather than US census or divsion data.
Thanks
Anonymous
Grab the JSON files for the US census regions, add them to your shape, and you've got exactly what you need:
For US maps: https://github.com/d3/d3/wiki/gallery/#maps
(original source: https://community.powerbi.com/t5/Desktop/US-states-Shape-Map-JSON-file/m-p/79071)
This should resolve the problem 🙂
- Anonymous4 years agoNot applicable
TheoC Thank you for sharing the github link however when i try to download file link broken link and doesnt work. Do you know of any other source that has the files
- TheoC4 years ago
Community Champion
Anonymous try this one:
https://github.com/johan/world.geo.json/tree/master/countries/USA
- TheoC4 years ago
Community Champion
Anonymous actually, scratch the previous link. Use this one, directly from the US Census site: https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html