Build your first map

This tutorial takes about 20 minutes. You start with an empty visual and a ten-row table, and finish with a map of circles sized and colored by sales, on a basemap you chose, with labels and tooltips. Then you add a table to the page and filter it by selecting on the map.

The finished map: ten US cities drawn as circles sized and colored by sales, each labeled with its city name, on a light basemap
The map you build in this tutorial

Before you start

You need:

Step 1: Create the sample data

  1. In Power BI Desktop, select Home > Enter data.
  2. Copy the table below, select the first cell of the grid in the Create Table window, and paste.
  3. If Power BI does not pick up the column names, select Use first row as headers.
  4. Name the table Stores and select Load.
City Latitude Longitude Sales Category
Seattle 47.6062 -122.3321 420 Retail
San Francisco 37.7749 -122.4194 610 Online
Los Angeles 34.0522 -118.2437 880 Retail
Denver 39.7392 -104.9903 310 Wholesale
Dallas 32.7767 -96.7970 540 Retail
Chicago 41.8781 -87.6298 760 Online
Atlanta 33.7490 -84.3880 450 Wholesale
Miami 25.7617 -80.1918 390 Retail
New York 40.7128 -74.0060 950 Online
Boston 42.3601 -71.0589 280 Wholesale

Expected result: a table named Stores appears in the Data pane with five columns. Latitude, Longitude and Sales show the sum symbol, which tells you they are numbers.

If Latitude and Longitude are not numbers

On a computer whose regional settings use a comma as the decimal separator, Power BI may read 47.6062 as text. Select the column in the Data pane and check that Data type on the Column tools ribbon is Decimal number. If it is not, retype the values with your own decimal separator.

Step 2: Add the visual

  1. Select the Icon Map Slicer icon in the Visualizations pane.
  2. Drag a corner of the new visual so it fills most of the left two thirds of the page. Leave room on the right for a table, which you add in step 9.

Expected result: the visual shows the Icon Map Slicer start page, "Filter your report from the map", with a Get started panel. On a large visual the start page also shows example maps. If you have no license, a license message appears once you add fields: select Get FREE Developer License and follow the steps, or enter your license key.

The Icon Map Slicer start page in an empty visual
The start page, shown until you add a field

Step 3: Add the fields

Keep the visual selected and drag fields from the Stores table into the field wells in the Build pane, in this order.

  1. Drag City to * ID (required).

    Expected result: the start page is replaced by a panel titled What kind of map are you making?. It tells you that only the ID is filled in so far. This panel is the layer guide. It appears whenever your rows do not reach a layer yet.

  2. Drag Longitude to Longitude (X) and Latitude to Latitude (Y).

  3. In each of those two field wells, select the arrow next to the field and choose Average.

    Expected result: the layer guide stays, and now says that Circles is turned on, but also needs Circle Size. Point to the Circles tile to see the fields it needs, with a tick next to the ones you have added. The card opens over the tile and, on a short visual, can cover the summary at the top of the guide.

    The layer guide with the Circles tile expanded, showing ID, Longitude and Latitude ticked and Circle Size still to add
    The layer guide shows what each layer type needs
  4. Drag Sales to Circle Size.

    Expected result: the guide closes and the map appears. It zooms to fit ten circles across the United States, larger where sales are higher.

Ten circles of different sizes over the United States on the default basemap
Circles appear as soon as a row has an ID, a position and a size

Your field wells now look like this:

Field well Field
* ID (required) City
Longitude (X) Average of Longitude
Latitude (Y) Average of Latitude
Circle Size Sum of Sales
Why did circles appear without turning anything on?

On a new map the Circles layer is already on. Each row has an ID, a longitude, a latitude and a circle size, and no other layer's fields, so it is drawn as a circle. See How Icon Map Slicer works.

The City field in * ID (required) matters twice: it makes one circle per city, and it is the field the report is filtered on when you select a circle.

Step 4: Style the circles in the Layer Manager

  1. Open the Format pane and expand the Layer Manager card, the first card in the list.

  2. Switch on Open Layer Manager. The dialog opens and the switch turns itself off again.

    Expected result: the Layer Manager shows On the map on the left with one layer, Circles, above a Basemap row. Under Your data on the right it reports 10 rows and that every row is drawn.

  3. Select the Circles row. Its editor opens on the right.

  4. Drag the handles of Circle size to 8 and 40. These are the sizes of the smallest and largest circle.

  5. Set Outline to white (#FFFFFF) and Outline width to 1.

    The Layer Manager with the Circles editor open, showing Size, Circle size, Fill, Outline and Outline width
    The Circles editor in the Layer Manager
  6. Select Apply changes at the bottom right.

Expected result: the dialog closes. The circles now range from small to large with a thin white outline. Nothing is saved to the report until you select Apply changes, so you can use Cancel to back out.

Step 5: Color the circles by sales

The Layer Manager sets one color for a whole layer. To take the color from your data, use conditional formatting in the Format pane.

  1. In the Format pane, go to Data Layers > Circles - Formatting.
  2. Next to Fill Color, select the fx button.
  3. In the Power BI dialog, set Format style to Gradient and choose Sales as the field to base it on. Pick a light color for the lowest value and a dark color for the highest.
  4. Select OK.

Expected result: each circle takes a color between your two colors. New York, with the highest sales, is the darkest, and Boston the lightest.

The ten circles now shaded from light to dark by sales
Size and color both follow Sales

Most color, size and visibility settings accept conditional formatting. See Conditional formatting.

Step 6: Choose a basemap

  1. Open the Layer Manager again (Format pane > Layer Manager > Open Layer Manager).

  2. On the Basemap row at the bottom of the layer list, select Configure.

    Expected result: the Layer Manager closes and the Basemaps dialog opens. The list on the left, In the picker, holds the Icon Map basemap styles. The one the map opens with is marked Default.

  3. Find a pale style, for example Positron, and select the star on its row. The Default badge moves to it.

    The Basemaps dialog with the list of Icon Map styles on the left and a preview of the selected style on the right
    The Basemaps dialog: the starred basemap is the one the map opens with
  4. Select Apply changes.

    Expected result: the Layer Manager comes back and its footer reads "The basemaps are saved."

  5. Select Done.

Expected result: the map is now on the pale basemap, and the colored circles stand out against it.

The list of Icon Map styles is updated from time to time, so the names you see can differ from the ones here. Any style works for this tutorial. See Icon Map basemap styles.

Step 7: Add labels

  1. In the Format pane, expand the Labels card and its Content group.

  2. Set Display Label to Yes.

  3. Next to Label Text, select fx. Set Format style to Field value, choose City as the field, and select OK.

    Expected result: each circle shows its city name in a box, centered on the circle.

  4. In the Style group, set Label Style to Halo Text.

  5. In the Placement group, set Position (circles & images) to Above.

Expected result: the names sit above the circles as plain text with a white halo, which keeps them readable on any basemap.

Labels now have their own Data labels row in the Layer Manager, where you can change their style, size and color. See Data labels.

Step 8: Add tooltips

  1. Drag Category to the Tooltips field well.
  2. Drag Sales to Tooltips as well.
  3. Point to a circle on the map.

Expected result: a tooltip lists the category and the sales for that city. When the Tooltips field well is empty, the tooltip shows the ID and the circle size instead. See Tooltips.

Step 9: Add a table to filter

A slicer needs something to filter. Add a table of the same data next to the map.

  1. Select an empty part of the report page, so that no visual is selected.
  2. In the Visualizations pane, select Table.
  3. Drag City and Sales from the Stores table into the table's Columns well.
  4. Place the table to the right of the map.

Expected result: the table lists all ten cities and their sales.

Step 10: Select on the map to filter the report

  1. On the map, select the circle for New York.

    Expected result: the table shows only New York. On the map, the New York circle stays solid and the other nine fade. The map keeps every circle: only the other visuals are filtered.

    The map with the New York circle solid and the other circles faded, next to a table that lists only New York
    Selecting a circle filters the table to that city
  2. Hold Ctrl and select Chicago and Boston.

    Expected result: the table shows New York, Chicago and Boston. Ctrl, or Shift, adds to the selection. Ctrl and select a selected circle to take it out again.

  3. Select an empty part of the map, away from the circles.

    Expected result: the selection clears, every circle is solid again, and the table lists all ten cities. Selecting the same circle a second time also clears it.

Filtering goes one way

Selecting on the map filters the other visuals. Selecting a row in the table does the opposite: the map then draws only the cities that remain. Select the row again to bring the others back.

Step 11: Select by drawing a lasso

Clicking works for a few items. To select many at once, draw around them.

  1. Select the map, and in the Format pane expand Selection > User Selection.

  2. Switch on Lasso.

    Expected result: a Lasso Select Tool button appears at the top left of the map, with the other map buttons.

  3. Select the Lasso Select Tool button, then press and drag on the map to draw a loop around Seattle, San Francisco and Los Angeles. Release to finish.

Expected result: the three West Coast cities are selected and the table shows only them. The lasso switches itself off after each use, so the map can be dragged again. Select the button again to draw another lasso.

A lasso drawn around the three West Coast circles, which are solid while the rest are faded
A lasso selects every circle inside the shape you draw

The same group also has Circle Select, for everything within a distance of a point, and Isochrone Select, for everything within a travel time. See Click, lasso and circle select and Select by travel time.

Step 12: Try the map

  • Zoom and move. Scroll to zoom, drag to pan, and use the + and - buttons at the top left.
  • Tilt and rotate. Hold the right mouse button and drag, or use the compass button under the zoom buttons. Select the compass to face north again.
  • Switch to a globe. In the Format pane, go to User Interface > Controls and switch on Globe Toggle. A globe button appears at the top left. Select it to switch between the globe and the flat map.

What you have learned

  • A row is drawn when it fills in the fields its layer needs. For circles these are * ID (required), Longitude (X), Latitude (Y) and Circle Size.
  • The layer guide tells you what is missing while nothing is drawn.
  • The Layer Manager is the place to add, style and order layers, and to open the Basemaps dialog.
  • The Format pane is the place for conditional formatting (fx), for the selection tools on the Selection card, and for every other setting.
  • Selecting on the map filters the other visuals on the page by the * ID (required) field. The map itself keeps every item and fades the ones you did not select.

Next steps