Sub topic 10
Plotting geographic data on maps
This chapter assumes you can build basic visuals on the Power BI Desktop canvas. It also assumes you have a model with a location column and measures such as [Total Sales]. It covers when a map is the right visual, how to prepare location fields, which map visual to use, and the mistakes that make maps misleading.
When a map is the right answer
A map earns its space only when position matters. That means readers need to see where things are, how close they are, or how values cluster across regions. If the question is "which region sold the most?", a ranked bar chart is usually faster to read and more accurate. A map answers a different question: "where are the hot spots, and do neighbors behave alike?"
Maps also cost more than other visuals. They need geocoding (converting names to coordinates), they take up a lot of canvas, and some tenants restrict them. Use one when the spatial pattern is the finding.
Question -> Visual
Rank regions by sales -> Bar chart sorted by value
Where are sales concentrated? -> Map (bubbles)
Which states are above average rate? -> Filled map (normalized measure)
Values for custom territories -> Shape mapPrepare the location field
Power BI draws a map by sending your location text, or your coordinates, to a geocoding service. Geocoding is the step that turns "Lyon" into a latitude and longitude. How you prepare the field decides whether the map is correct.
- Select the column in the Data pane.
- Open the Column tools tab and set Data category to the right type: Country/Region, State or Province, City, County, Postal Code, Address, Latitude or Longitude.
- Check for ambiguous names. "Paris" can mean France or Texas, and "Georgia" can mean a country or a US state.
Fix ambiguity in one of three ways:
- Add a hierarchy such as Country > State > City, and place all levels in the Location well.
- Build a combined text column, for example
"Paris, France". - Supply real latitude and longitude columns, which skip name matching entirely.
Coordinates are the most reliable option when you have them. Keep latitude and longitude as decimal numbers, set their data categories, and confirm that no row has the two values swapped.
Location Label =
Geography[City] & ", " & Geography[Country]This calculated column on a Geography table builds a label that is less likely to match the wrong place. Set its data category to City.
The built-in map visuals
| Visual | Draws | Best for | Main limit |
|---|---|---|---|
| Map | Bubbles at points, optional pie slices per bubble | Point locations, cities, stores, coordinates | Overlapping bubbles hide each other in dense areas |
| Filled map | Shaded areas such as countries, states, counties | Rates and averages by region | Large areas dominate visually |
| Shape map | Your own TopoJSON boundaries | Sales territories, custom districts | Needs a boundary file and is less polished |
| Azure Map | Layers on Azure Maps, with reference layers | Richer spatial analysis | Needs Azure Maps to be enabled in the tenant |
The field wells for the first two are similar:
- Location takes a place name. Latitude and Longitude take coordinates. Use one approach or the other.
- Legend splits bubbles by a category, such as product group.
- Size (Map) scales bubbles by a measure.
- Color saturation (Filled map) shades areas from light to dark by a measure.
Choose the measure carefully
The measure you place in Size or Color saturation matters more than the visual type. Raw totals mostly show where people live. A city with more customers has more sales, which tells you little about performance. Normalize the measure so each place is compared fairly.
Total Sales = SUM ( Sales[SalesAmount] )Sales per Customer =
DIVIDE (
[Total Sales],
DISTINCTCOUNT ( Sales[CustomerKey] )
)Sales per Customer assumes your Sales table has a CustomerKey column. DIVIDE returns blank instead of an error when a region has no customers, so those regions stay unshaded instead of breaking the visual.
Use these rules of thumb:
- Bubble size suits counts and totals, because size reads naturally as quantity.
- Shading suits rates, ratios and averages, because shading reads as intensity.
- Do not shade a filled map by a raw total unless regions are similar in size and population.
Decision flow
Common problems
The map is blank or shows a prompt. In the Power BI service, a tenant admin can turn off map and filled map visuals under tenant settings. Desktop may work while the published report shows nothing. Ask your admin whether "Use map and filled map visuals" is enabled. Some organizations also block the external geocoding calls that the visuals need.
Points land on the wrong continent. This is nearly always ambiguous names. Add the country, use a hierarchy, or switch to coordinates.
Large regions dominate. On a filled map, a big sparsely populated state draws the eye even when its value is small. Pair the map with a ranked bar chart, or switch to bubbles so size encodes the value.
Bubbles overlap in dense areas. Reduce bubble size in the format pane, filter to a smaller area, or aggregate to a coarser level such as state instead of city.
Totals look right but the pattern misleads. If the shading simply follows population, normalize the measure, as in Sales per Customer.
Formatting for clarity
- Use a single-hue color scale for a single measure, light for low and dark for high. Avoid rainbow scales, which have no natural order.
- Turn off map controls and labels you do not need, and keep a plain base style so data stands out.
- Add a title that names the measure and the unit, such as "Sales per customer by state".
- Use tooltips to show the exact value, plus the count behind a rate, so readers can judge reliability.
- Check that the color scale has enough contrast for readers with color vision deficiency. Do not rely on color alone for key findings.
Summary of the decision
Start from the question. If position matters, check that your location fields are categorized and unambiguous. Pick bubbles for points and totals, shading for rates by region, and a shape map only when you need custom boundaries. If a sorted bar chart answers the question just as well, use that instead.
Exercise
A report shows a filled map of total sales by US state. California and Texas are the darkest, and the manager concludes they are the best-performing markets. What is wrong with this reading, and how would you fix the visual?
Show answer
Total sales largely track population, so the darkest states are simply the biggest ones. The map hides performance differences and gives large states more visual weight. Replace the shading measure with a normalized one, such as Sales per Customer using DIVIDE ( [Total Sales], DISTINCTCOUNT ( Sales[CustomerKey] ) ). Optionally add a ranked bar chart beside the map so exact values can be compared.
Exercise
Your map places a store in "Paris" in Texas instead of France. Name two ways to fix this without changing the source system.
Show answer
Add the country to the location, either by using a Country > City hierarchy in the Location well or by creating a combined column such as Geography[City] & ", " & Geography[Country] and setting its data category to City. Alternatively, use Latitude and Longitude columns, which avoid name matching.