Chapter 4. Maps

Dashboards often contain information about sites in different continents, countries, regions or cities. Power BI’s standard set of charts has special elements for this purpose - maps. Using these, for example, a business can monitor the geography of its sales, shipments or purchases, as you’ll see in Figure 4-1.

Map to illustrate sales in different regions of Europe. The bigger the bubble  the more sales in the region
Figure 4-1. Map to illustrate sales in different regions of Europe. The bigger the bubble, the more sales in the region

The map in Figure 4-1 illustrates how sales are spread across the regions of Europe. As you can see, there is a focus of sales around Paris (the red bubbles indicate France), but there is almost equal sales across the regions of the country. Shipments to England stand out in terms of scale compared to the rest of the European regions, but there are no sales in the UK. Sales in Germany are uniform and have a few dispersed centers throughout the country.

You can use a map to show their results if your company has many sales outlets, warehouses or call centers in different geographical locations. Below we will explain how to allocate data fields in Power BI for scaling and design this visual intelligently.

Possible mistakes

Before you start creating and setting up a map on your dashboard, review the limitations and options of this visual element that may cause visual mistakes.

1. Bubbles are difficult to compare

You can estimate the indicators on the map only by the size of the bubbles, but this estimate will not always correct. For example, bubbles with similar values may appear to be similar. And even if we see a large bubble next to a small one, we don’t realise how much bigger one is than another.

The column chart we discussed in Chapter 1 could do a better job of a map in this case. In figure 11-2 on the right-hand side, the data is perfectly clear. To the right, you can perfectly see that sales in the US are 2.5 times higher than in Germany or the UK, and that in France they are slightly lower than in neighbouring European countries.

On the left are sales volumes in different countries on a map. On the right is the same data on a column chart in a more convenient format for comparison.
Figure 4-2. On the left are sales volumes in different countries on a map. On the right is the same data on a column chart in a more convenient format for comparison.

2. Data labels don’t display values

Maps also lose out to other visuals in informativity. You can add only the category names (countries, regions, cities), but you cannot display numerical values. In Figure 4-3 you can see that there is not even a ‘Data labels’ option in the settings panel.

Power BI does not allow exact numerical values to be displayed on the map
Figure 4-3. Power BI does not allow exact numerical values to be displayed on the map

3. Appearance of unnecessary pie charts

If you place data fields in Power BI incorrectly, the program will add pie charts to the map. Many people are happy about it and try to display the sales structure like this. We do not recommend using this technique in interactive dashboards. Pie charts are overlapping in Europe (Fig. 11-4), so all this turns into a color mess.

As you can see in Figure 4-4 on the left, the legend of the pie chart is placed above the map instead of next to it. Because of this, it is not clear which region belongs to which sector. Decide on classic bubbles in the same colors as the top-level geographical data (in our case it’s the country).

On the left is a map with incorrectly positioned data fields  on the right is a more informative version with classic bubbles
Figure 4-4. On the left is a map with incorrectly positioned data fields, on the right is a more informative version with classic bubbles

4. Mistakes in the placement of objects

Due to the similarity of names, the map does not always correctly relate the region to its location. Therefore, for instance, some regions in France may be located in Russia or Romania. To avoid this, it is better to add geographical coordinates as well as the names of the regions to the data in order to avoid distorting the representation. Figure 4-5 shows how to add coordinates to a map.

You can add the exact coordinates of objects in the settings panel  in the Latitude and Longitude rows
Figure 4-5. You can add the exact coordinates of objects in the settings panel, in the Latitude and Longitude rows

We’ve got acquainted with the features of the visual element, now let’s move on to the building and design. In Figure 4-6, the map is different before and after adjustment.

On the left is the default map. On the right   version after configuration
Figure 4-6. On the left is the default map. On the right - version after configuration

Step-by-step guide for creating and setting up a map

You can create a map on the dashboard in Power BI and design it visually. To do this, simply follow the 5-step instructions.

Step 1: Allocate data fields

To ensure that the data on the map is displayed correctly, make sure that the fields with them are positioned right. Add fields on the “Create visual element” tab.

Location

Here we move the field with the names of the cities, regions, addresses (in our example it is “State”).

Legend

Here we place the field with the data of the top level of the geographical hierarchy (in our case it is “Country”).

Bubble size

This is for numerical value (in our case it is “Sales fact”).

In general, if you get something strange instead of a map (an empty map or incomprehensible pie charts), it is often due to the fact that the “Location” and “Legend” fields were mixed up. Delete them and start over:

  • Put the field with the names of the cities, regions or addresses Into “Location”.

  • Then add numerical value into “Bubble size”

  • “Legend” - it is optional, your map may have no legend

In the Figure 4-7 you can see the proper placement of the data fields

Proper placement of the data fields will show classic bubbles on the map instead of pie charts
Figure 4-7. Proper placement of the data fields will show classic bubbles on the map instead of pie charts

Step 2: Add and set up category labels

This map can be zoomed and it is not always clear what the bubbles refer to. To fix it, you can add the names of the regions to the bubbles. For this purpose, activate the check box for the “Category labels” section and adjust their appearance (Figure 11-8):

Font

Increase to 10-12 pt;

Color

Leave it white by default, because we use dark grey background;

Background

Leave it on, so that the labels do not get lost in the coloured background of the map and bubbles.

Figure 11-8. Region names can be configured under Category labels

Step 3: Set up the bubble size

While zooming the map, small bubbles often get lost. To avoid this, increase their minimum size from the default 10 points to 12. You can do this in the “Bubble” section (Figure 4-8).

It would be enough in our example to make the bubbles visible at any scale. In your own projects, you should find “the golden mean” on your own. All other bubbles will automatically be enlarged based on the given indicator (in our case it is the revenue volume).

In the Bubblez settings section  set the minimum size of the bubbles as well as their colors
Figure 4-8. In the Bubblez settings section, set the minimum size of the bubbles as well as their colors

In the section ‘Colors', you can change the color for the conditional formatting to achieve a greater visual distinction between countries. For example, France is blue, Germany is purple, and Great Britain.

Step 4: Set map parameters

For business dashboards, avoid choosing maps in saturated colors - it detracts from the data. Select the style of the visual element in section “Map settings”, sub-item “Style” as you’ll see in Figure 4-9. In our case, we will select “Light” from the suggested options.

If you have worldwide sales, in section “Controls” you can leave a tick near “Auto zoom” - so you will see the full map at any updates.

If you only need to track a part of the map, for example Europe, you should uncheck “Auto zoom”. Once you zoom map view to Europe it will remain on your dashboard, won’t need to zoom it again i

However, even after autoscaling is switched off, you can still drill down and move to other sectors of the map as required.

Some users are not aware that the map can be zoomed in using the mouse wheel. You can add zoom buttons for easy usability by ticking the box next to the relevant item.

Select map style and add zoom buttons under Map settings
Figure 4-9. Select map style and add zoom buttons under Map settings

Step 5: Give a clear headline

Your map is almost ready, the final touch is left. Now give the chart a clear name and set it up in the same way as you have already done with the other charts.

  1. Under “Name”, replace the automatic wording with an understandable title.

  2. Leave the default font size of 14 points.

  3. Specify left-alignment.

After these 5 steps the bubble map setup is complete!

Tips & Notes

We confess that we don’t like to use maps on dashboards. They tend to take up a lot of space and are usually not very informative for financial reporting and executive dashboards. But it might be effective for operational delivery monitoring and customer location correlations.

When choosing a map for your dashboard, keep the real business need in mind, not the “visual variety”.

Checklist for setting up a map

  1. Correctly position the fields for the map construction.

  2. Add and set up the data signatures.

  3. Set the minimum size of the bubbles so that they are visible at any map scale. Adjust the colors of the bubbles.

  4. Select a simplified map base and neutral style, and adjust the scaling.

  5. Edit the name of the chart to make it clear and easy to understand.

Get Data Visualization with Microsoft Power BI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.