Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

v-tangjie-msft

Tips on adjusting the scaling of visual objects on maps

Scenario: 

 

The Bing Map object in Power BI Desktop displays a wide area when you select a different province with the Slicer. To make the map roughly zoom in to the province level, you can use different levels of geographic locations or use latitude and longitude instead of only province in the Bing Map object. You can also use the Filled map feature of the Azure Map object. 

 

Current result: 

 

In Power BI Desktop, drag only the Province field to the Slicer visual object and the Bing Map visual object. 

vtangjiemsft_0-1716966178645.png

 

After selecting Jiangsu in the Slicer visual object, the page effect is as follows:

vtangjiemsft_0-1716966773850.png

 

As you can see, the display is wider, even to Taiwan and South Korea. I don't want to show such a wide area, I want to show the approximate area of Province after Slicer filtering.

 

Expected result: 

 

I'd like to have the user select Province in Slicer and then have the area displayed in the Map be roughly the Province range.

Implement a visual effect similar to Filled Map's zoomed range without having to add a border:

vtangjiemsft_0-1716966936213.png

 

Sample data: 

 

Province table:

Province

Sichuan

Jiangsu

Yunnan

Guizhou

Fujian

Shandong

 

How:

Solution 1:

Add hierarchical data, such as City, to each Province of the original data.

AppendTable table:

vtangjiemsft_0-1716969235809.png

 

Now, you can see that there are different cities' data in each of the same Provinces, and you can add more data if you want a more accurate range of Provinces to be displayed.

Set the Data category of Province and City to State or Province and City.

vtangjiemsft_0-1716967132236.png

 

vtangjiemsft_1-1716967145076.png

Drag the Province field of the Province table into the Slicer visual object and the City field into Location of the Bing Map visual object.

vtangjiemsft_0-1716967311237.png

Select Jiangsu in Slicer, the display effect is as follows:

vtangjiemsft_1-1716967331044.png

 

Solution 2:

 

Go online and search for the Latitude and Longitude corresponding to each Province in the raw data table. However, if there is only one Latitude and Longitude corresponding to each Province in the data table, it will show a too small range in the map. Therefore, adding multiple Latitude and Longitude data to the same Province will be better.

 

Table table:

vtangjiemsft_0-1716967933671.png

Set the Data categories for Latitude and Longitude to Latitude and Longitude.

vtangjiemsft_0-1716968840547.png

 

vtangjiemsft_0-1716968806811.png

Drag the Province field of the Province table into the Slicer visual object.

In the Bing Map visual object, remove the Province field and drag the Latitude and Longitude fields of the Table table into the Bing Map visual object.

vtangjiemsft_0-1716969291104.png

Select Jiangsu in Slicer, the final page visual effect is as follows:

vtangjiemsft_0-1716969324497.png

If you want to display a more detailed Province range, you can add multiple latitudes and longitudes to the same Province and then use this method.

 

Solution 3:

 

This type of requirement can also be achieved using Azure Map.

 

Drag the Province field of the Province table to Location, at which point the display looks as shown below:

vtangjiemsft_0-1716969358977.png

Enable the Filled map feature under the Format tab:

vtangjiemsft_1-1716969371423.png

At this time, the display effect is shown below, you can see that this method is also the realization of the demand.

vtangjiemsft_2-1716969391023.png

 

Summary: 

 

When using Bing Map in Power BI Desktop and only having Province field in the map, if the user selects Province in the Slicer, the Map visual object will display a wide range with low accuracy.

 

If you want to display an approximate range of Province in the Bing Map visual object, you can use a hierarchy of geographic locations, or replace the Location fields with Latitude and Longitude, or enable the Filled map feature tab of the Azure Map visual object.

 

Hope this article can help you solve similar problems.    

 

Author: Daisy Yang

Reviewer:Ula and Kerry