Forum Discussion
Power BI Map - Sales Data
- 4 years ago
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
dokat check this link out: https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map
- 4 years ago
dokat 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
dokat you may need to convert to JSON: https://www.statsilk.com/maps/convert-esri-shapefile-map-geojso
- 4 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
dokat 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
dokat you may need to convert to JSON: https://www.statsilk.com/maps/convert-esri-shapefile-map-geojso
- dokat4 years agoPost Prodigy
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 - TheoC4 years agoCommunity Champion
Hi dokat
A few things can cause this but is likely stemming from a change to excluding Alaska? The other factor could be the values and their format? Are you using a measure for the values (i.e. SUM ( Table[Amount] ) or pulling straight from the field pane?
Cheers mate.
Theo
- TheoC4 years agoCommunity Champion
dokat the map looks sensational mate! Well done on getting there. In all honesty, I think you could put together your first blog post on the Community about how you went through this process; a step-by-step guide on this. Many members of the Community would find it beneficial!!