Forum Discussion
Power BI Map - Sales Data
Hi,
I am trying to map out my sales data with power bi. Below is the format of my census division data. I dont have longtidue or lattiudue . Based on below census divisions is it possible to map out my data in power bi?
| Census Division | Measures | Values |
| New England | Dollars | $13,024 |
| Middle Atlantic | Dollars | $11,044 |
| East North Central | Dollars | $22,402 |
| West North Central | Dollars | $13,233 |
| South Atlantic | Dollars | $17,095 |
| East South Central | Dollars | $13,997 |
| West South Central | Dollars | $14,064 |
| Mountain | Dollars | $10,279 |
| Pacific | Dollars | $7,849 |
| South Atlantic | Dollars | $710 |
| East South Central | Dollars | $391 |
| New England | Dollars | $1,899 |
| Middle Atlantic | Dollars | $4,363 |
| East North Central | Dollars | $8,963 |
| West North Central | Dollars | $3,282 |
| South Atlantic | Dollars | $5,818 |
| East South Central | Dollars | $1,677 |
| West South Central | Dollars | $2,318 |
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 🙂
dokat check this link out: https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map
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
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
19 Replies
- TheoCCommunity Champion
Hi dokat
Given the limited data accuracy, it is likely you'd have some inaccurate points on the respective map. You could amend slightly to allocate a State and Country to help mitigate these.
The below is what you will end up with if you're using the Map visual.
As mentioned, there will be some limitations.
All the best.
Theo