Create and use filled maps (choropleth maps) in Power BI
APPLIES TO:
Power BI Desktop
Power BI service
A filled, or choropleth, map uses shading or tinting or patterns to display how a value differs in proportion across a geography or region. You can quickly display relative differences with shading that ranges from light (less frequent/lower) to dark (more frequent/more).
What is sent to Bing?
Power BI integrates with Bing to provide default map coordinates (a process called geo-coding). When you create a map visualization in Power BI service or Power BI Desktop, the data in the Location, Latitude, and Longitude buckets (that is being used to create that visualization) is sent to Bing.
You, or your administrator, may need to update your firewall to allow access to the URLs Bing uses for geocoding. Those URLs are:
- https://dev.virtualearth.net/REST/V1/Locations
- https://platform.bing.com/geo/spatial/v1/public/Geodata
- https://www.bing.com/api/maps/mapcontrol
For more information about the data being sent to Bing, and for tips to increase your geo-coding success, see Tips and tricks for map visualizations.
When to use a filled map
Filled maps are a great choice:
- to display quantitative information on a map.
- to show spatial patterns and relationships.
- when your data is standardized.
- when working with socioeconomic data.
- when defined regions are important.
- to get an overview of the distribution across the geographic locations.
Prerequisites
This tutorial uses the Sales and Marketing Sample.
Download the sample PBIX file to your desktop.
Open Power BI Desktop, and from the menu bar, select File > Open report.
Browse to the Sales and Marketing Sample PBIX file, then select Open.
On the left pane, select the Report icon
to open the file in report view.
Select
to add a new page.
Note
Sharing your report with a Power BI colleague requires that you both have individual Power BI Pro licenses or that the report is saved in Premium capacity.
Create a filled map
From the Fields pane, select the Geo > State field.
Select the Filled map icon to convert the chart to a filled map. Notice that State is now in the Location well. Bing Maps uses the field in the Location well to create the map. The location can be various valid locations: countries/regions, states, counties, cities, zip codes, or other postal codes etc. Bing Maps provides filled map shapes for locations around the world. Without a valid entry in the Location well, Power BI can't create the filled map.
Filter the map to display only the continental United States.
a. To the left of the Visualizations pane, look for the Filters pane. Expand it if it's minimized
b. Hover over State and select the expand chevron.
c. Place a check mark next to Select all and remove the check mark next to AK.
Select the paint brush icon to open the Formatting pane, and choose Fill colors.
Next to the Default color, select fx.
Use the Default colors - Fill colors screen to determine how your filled map will be shaded. The options available to you include which field to base the shading on, and how to apply the shading. In this example we're using the field SalesFact > Sentiment, and setting the lowest value for sentiment to red and the highest value to green. Values that fall between the maximum and minimum will be shades of red and green. The illustration at the bottom of the screen shows the range of colors that will be used.
The filled map is shaded in red and green, with red representing the lower sentiment numbers and green representing the higher, more-positive sentiment. To display more detail, drag a field into the Tooltips well. Here we've added SalesFact > Sentiment gap. Highlighting the state of Idaho (ID) shows us that sentiment gap is low, at 6.
Save the report.
Power BI gives you plenty of control over the appearance of your filled map. Play around with these data color controls until you get the look you want.
Highlighting and cross-filtering
For information about using the Filters pane, see Add a filter to a report.
Highlighting a location in a filled map cross-filters the other visualizations on the report page... and vice versa.
To follow along, first save this report by selecting File > Save.
Copy the filled map using CTRL-C.
From the bottom of the report canvas, select the Sentiment tab to open the Sentiment report page.
Move and resize the visualizations on the page to make some room, then CTRL-V paste the filled map from the previous report. (See the following images)
On the filled map, select a state to cross-highlight and cross-filter the other visualizations on the page. Selecting Texas, for example, cross-filters the cards and cross-highlights the bar chart. As a result, you can see that Sentiment is 75 and that Texas is in the Central District #23.
Select a data point on the VanArsdel - Sentiment by Month line chart, which filters the filled map to show Sentiment data for VanArsdel and not their competition.
Considerations and troubleshooting
Map data can be ambiguous. For example, there's a Paris, France, but there's also a Paris, Texas. Your geographic data is probably stored in separate columns—for example, a column for city names and a column for state or province names—so Bing may not be able to tell which Paris is which. If your dataset already contains latitude and longitude data, Power BI has special fields to help make the map data unambiguous. Just drag the field that contains your latitude data into the Visualizations > Latitude area. And do the same for your longitude data.
If you don't have access to latitude and longitude data, but you do have edit access to the dataset, follow these instructions to update your dataset.
For more help with Map visualizations, see Tips and tricks for map visualizations.
Next steps
Feedback
Submit and view feedback for