How to create Map Visuals in Microsoft Power BI

Share Now


A map chart is often used to display geographic data by value or category. It represents locations on a geographical map, and allows to visualize spatial relationships in data. In this article we will learn how to create map visuals in Microsoft Power BI.

           We can create two types of map charts in Power BI: Symbol Map Chart, and Filled Map Chart.

Let us say we have captured some location information like City, Country, State, Latitude, Longitude etc. in an ‘Orders’ table, and we wish to create two types of map chart for the states of US. For this, we load the ‘Orders’ table in our Power BI workbook. We have a page named as ‘Map Visuals’ in our workbook. After loading the required ‘Orders’ table in our workbook, following steps can be used to create the two types of map chart for the same:

  • We first pull out the location information from the ‘Orders’ data. To do this, we first open the ‘Orders’ table in the ‘Fields’ pane in the ‘Map Visuals’ page as below:

Create Symbol Map Chart

  • Now in order to create a symbol map chart, select the ‘Map’ button from the ‘Visualizations’ pane:
  • On selecting this, we will get a map visual as below:

In this chart type, we can see the areas in the ‘Fields’ section are: Location, Legend, Latitude, Longitude.

For fields like Country, City, State, the program will automatically compute or pick the latitude and longitude information, which can be used to create our map visuals.

So we can see in the above screenshot that all the states of US are represented by blue bubbles in the symbol map chart.

For instance, if we drag ‘State’ to ‘Location’ area in the ‘Visualizations’ pane, then the program automatically highlights the states of US as follows:

We can even resize these bubbles on the basis of number variables like ‘Sales’ say.

So if we select and drag ‘Sales’ to the ‘Size’ area in the ‘Visualizations’ pane, then the program automatically changes the size of each bubble on the basis of sales amount for each state:

Also the bubble sizes can be increased or decreased by formatting these. To do this, click on the ‘Format’ button in the ‘Visualizations’ pane and then increase or decrease the size under ‘Bubbles’ category as follows:

how to create a map visual in power bi

Apply Slicer on Map Chart

Now that we have created a map chart, we can even apply filters on it using slicers. Let us follow the below steps to do so:

  • Click on the ‘Slicer’ button in the ‘Visualizations’ pane:
  • This will generate a blank slicer as below:
  • Let us create this slicer by region. To do this, we drag ‘Region’ to the ‘Field’ area of the ‘Visualizations’ pane:
best map visuals in power bi

So we can see that we get a checkbox slicer where we can select any region.

So let’s say we select ‘East’ region in the slicer, so we will have all the east region states of US that are in the east region in our map visual:

We can even change the type of slicer from checkbox slicer to button slicer. To do this, we click on the ‘Format’ button in the ‘Visualizations’ pane and then change the orientation under the ‘General’ category from ‘Vertical’ to ‘Horizontal’:

This will change the slicer to give a visual as follows:

So we can see that our slicer has changed from a checkbox slicer (vertical) to a button slicer (horizontal).

Change Map style

We can even change the map visuals as per some predefined map themes that are available in the ‘Format’ category under ‘Map styles’ -> ‘Theme’:

We can even apply heat map view on our map chart. To apply this, switch on the ‘Heat map’ in the ‘Format’ category:

This will highlight each state on the basis of sales value as below:

Create Filled Map Chart

Now we will create a Filled map Chart in another sheet of this workbook. Let us create a copy of the existing sheet and rename this as ‘Filled Map Visuals’ which will look like below:  

Now in order to create a filled map chart, we select the ‘Filled Map’ button from the ‘Visualizations’ pane, and this will change the map chart to a visual like below:

Change Map style

For this chart also, we can change the map visual as per some predefined map themes that are available in the ‘Format’ category under ‘Map styles’ -> ‘Theme’:

Changing the theme to ‘Aerial’ would give a map visual as below:

using map visual in power bi

Slicer on the map chart

Since we created a copy of the previous sheet, we have a slicer at the top for this filled chart also. We can select any of the region in the slicer and we will get the filtered region in the map visual.

We can even select multiple regions at a time in the slicer. To do this, we can switch on ‘Multi-select with CTRL’ or ‘Show “Select all” option’ in the ‘Selection controls’ under the ‘Format’ button in ‘Visualizations’ pane:

shape map visual in power bi

Show specific location in a map chart

  • Let us create another sheet in this workbook named as ‘Specific Location’.

Now we wish to find some specific locations in a map chart. In order to do so, we need to provide latitude and longitude information. Let us first open maps.google.com and follow the below steps:

  • Search the specific location by typing it in the search bar and pick its latitude and longitude from the address URL:
  • We can copy this latitude and longitude information to a new table in a Power BI workbook. To create a new table where we wish to enter the latitude and longitude, click on ‘Enter Data’ in the ‘Home’ tab:
filled map visual in power bi
  • This will open a ‘Create Table’ window like below:

Rename the table to: ‘Locationtbl’.

  • Now add more columns, enter the column names: Location, Longitude, Latitude, and then provide the name of the location, and lat-long information in these columns as below:
heat map visual in power bi

Also if this kind of information is stored in some csv file, we can directly load that in our workbook.

  • On loading this table in the workbook, we will have our ‘Locationtbl’ also visible along with the ‘Orders’ table in the ‘Fields’ pane:
  • Now let’s insert a map chart in this sheet by clicking on ‘Map’ button in the ‘Visualizations’ pane:
  • Drag Latitude to the ‘Latitude’ section, and Longitude to the ‘Longitude’ section in Fields area of the ‘Visualizations’ pane:
  • On doing this, we will see that the program will represent or highlight the two locations by bubbles in our map chart:
power bi shape map visual

We have successfully created symbol chart, filled map chart, and map visual for specific location by entering the latitude and longitude information.

So we have seen how to create map visuals in Microsoft Power BI.

If you want to learn How to create Bookmarks in Microsoft Power BI click here



Share Now
January 21, 2020

0 responses on "How to create Map Visuals in Microsoft Power BI"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Social Media

    facebook page EC Analytics Consulting   Linkedin Page EC Analytics Consulting   Youtube EC Analytics Consulting

    Address:

    NM 23, SECTOR 14, OLD DLF COLONY,
    GURGAON (HARYANA)
    0124- 4601426

    ABOUT EC ANALYTICS CONSULTING

    EC Analytics will help your business make better decisions by providing expert-level business intelligence (BI) services. Forecasting, strategy, optimization, performance analysis, trend analysis, customer analysis, budget planning, financial reporting and more. EC Analytics also offers Advanced Data Analytics training in corporate and retail.

    EC Analytics Consulting @ 2019 ALL RIGHTS RESERVED