Azure Maps visual in Power BI: layers, fields, geocoding

How the Azure Maps visual in Power BI shows location data, its Location, Latitude, Longitude, Legend, Size and Tooltips fields, the bubble, heat map, 3D column, filled, marker, path and reference layers, what is sent to Azure, and why it replaces Bing maps.

Short answer: the Azure Maps visual draws location data on a map in layers: bubbles sized by a measure, a heat map of density, 3D columns, filled regions, markers with custom icons, paths between points, and reference layers from your own files. Put an address, city or postcode in Location, or coordinates in Latitude and Longitude, a category in Legend and a measure in Size. It is the map to use for new reports: Microsoft has scheduled the Bing-based map and filled map visuals for deprecation. An admin must enable it in the admin portal.

A table of 300 stores with their revenue hides what a map shows at once: that the good stores cluster in the cities and the weak ones sit along one motorway. Location is a dimension like any other, and a map is its natural chart.

What can the Azure Maps visual draw?

Bubble layer
  • a circle per location, sized and coloured by measures
  • clusters bubbles when zoomed out
Heat map layerdensity of points, for many points where single bubbles overlap
3D column layer
  • a column per location, its height a measure
  • tilt the map to read it
Filled map layerregions (countries, states, postcodes) shaded by a measure
Marker layercustom icons and images per category, sized by a measure
Path layerlines between points, for routes and journeys
Pie chart layera small pie per location instead of a bubble
Reference layeryour own GeoJSON shapes (sales territories, delivery zones) under the data
The layers of the Azure Maps visual

Which fields does it take?

BucketWhat goes in
Locationan address, city, postcode, state or country/region as text; geocoded by Azure
Latitude, Longitudecoordinates in decimal degrees: exact and no geocoding needed
Legenda category: each value gets its own colour
Sizea measure that scales the bubbles or markers
Tooltipsmore measures shown on hover

Coordinates beat addresses. They are exact, they are not sent anywhere to be looked up, and they do not fail on ambiguous names ("Paris" in France or Texas).

How do you build one?

  1. Check that the visual is enabled: an admin turns on the Azure Maps visual in the Power BI admin portal under the integration settings.
  2. In Visualizations pick Azure Maps.
  3. Drag Store[Latitude] and Store[Longitude] to their buckets (or Store[City] to Location), a measure to Size and a category to Legend.
  4. In Format visual, pick the layers (bubble is on by default), the map Style (road, satellite, grayscale, dark), and the View: a fixed centre and zoom, or Auto zoom to fit the data.
  5. In the model, set each geographic column's Data category (City, Postal code, Latitude, Longitude, ...), so Power BI and Azure know what the column holds.

What data leaves your model?

Microsoft states it plainly: the visual calls a cloud service in Azure for map images and coordinates, and values in the Location bucket may be sent to Azure to be geocoded. Latitude and longitude values do not need geocoding. If customer addresses must not leave your tenant's boundaries, geocode them in your own data pipeline and pass only coordinates.

What DAX goes with a map?

A measure for size, and often one for colour. Revenue per store, coloured by growth:

Revenue = SUM ( Sales[Amount] )

Revenue Growth % =
DIVIDE ( [Revenue] - [Revenue LY], [Revenue LY] )

Growth Colour =
SWITCH (
    TRUE (),
    [Revenue Growth %] < 0, "#D64550",
    [Revenue Growth %] < 0.05, "#FFC72C",
    "#1A9E75"
)

Use Growth Colour in the bubble layer's Fill color with fx, Field value: big red bubbles are big stores that shrink. For a filled map of regions, a ratio (revenue per inhabitant, share of customers) is fairer than a total, because big regions are big anyway.

Should you move from the Bing maps?

The basic Map and Filled map visuals use Bing Maps and are scheduled for deprecation, with the timeline still being planned; existing ones keep working. Microsoft recommends moving to Azure Maps now, unless report users are in China or Korea or in a government cloud, where Azure Maps is not yet supported. Power BI can convert a Bing map to Azure Maps (see the conversion page below).

What goes wrong?

  • Wrong places. "Springfield" or "Paris" geocoded to the wrong country. Add the country, combine address parts into one column, or use coordinates.
  • Totals of big regions. A filled map of revenue by country mostly shows which countries are large. Map a rate.
  • Too many bubbles. Ten thousand points overlap into a blob; use the heat map layer or bubble clustering.
  • Visual not available. The Azure Maps visual is off until an admin enables it.
  • Privacy. Customer addresses in the Location bucket are sent for geocoding; use coordinates if that matters.

Where can you check this?

Where do you start?

Add latitude and longitude to your location table, set their data categories, and start with the bubble layer sized by one measure. For regions without exact points, a filled map or shape map colours areas instead.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.