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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Malick
Regular Visitor

Mapbox visual with multiple countries does not zoom in to the selected country

Hello,

I am struggling with my mapbox visual zoom in. I have the mapbox tile with 20 countries (each country at a sub-national level), where I show level of severity on a scale of 1 to 5. When I select the country from a Power BI slicer, the mapbox visual does not zoom in to the selected country? I have the field called 'comp_key' in the LOCATION field and also listed it as "Vector Propoerty Levle 1" in the choroplet setting part of the mapbox visual. This field actually contains the unique codes of each sub-national locations.

 When I manually zoom in , the visual does show the choropleth map at sub-national level. What could be the issue here, I will really appreciate if anyone can help provide guidance on resolving this problem, I will really be grateful. Thanks. 
Screenshot 2024-11-02 112438.jpgScreenshot 2024-11-02 112816.jpg

7 REPLIES 7
v-bofeng-msft
Community Support
Community Support

Hi @Malick ,

 

Thanks for the reply from @rajendraongole1. I noticed that @rajendraongole1 has already provided some excellent suggestions and alternative solutions.Thank you for your attention to this issue.

If there is an answer that helped you, please accept it as a solution. This will be of great help to other users who have similar problems as you.

If you have any questions please feel free to let us know.

 

Best Regards,

Bof

Hi @v-bofeng-msft , thank you for the message. I was looking for a solution for the Mapbox zoom in issue. Unfortunately that issue is still there. 

rajendraongole1
Super User
Super User

Hi @Malick - Your issue with the Mapbox visual in Power BI not zooming in automatically to the selected country is likely related to the configuration of the "comp_key" field and its interaction with Mapbox’s dynamic zoom functionality.

In the Power BI Mapbox visual, make sure that “Auto-Zoom” is enabled in the visualization settings if this option is available. This setting ensures that the map zooms into the area relevant to the filter selection.

If you don’t see an “Auto-Zoom” option, check if Mapbox updates have introduced any specific instructions on how to use location-based zoom with Power BI.

Mapbox doesn’t automatically recognize filters from Power BI to trigger zooming. You can try using a Power Automate integration to explicitly control the map view, but that requires custom scripting.

Mapbox provides documentation on using custom tilesets and Power BI integration

below link FYR:

Tilesets | Mapbox Docs | Mapbox

If these steps don’t resolve the issue, there may be a limitation in the Power BI integration with Mapbox, and you could consider reaching out to Power BI or Mapbox support for further assistance.

 

Hope this information helps.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks for replying @rajendraongole1 . The auto zoom is enabled. I have tried importing a new tileset with just the country boundaries to see if the issue was with the 'comp_key' which is a unique identifier for each location in the tileset, but unfortunately, the zoom in does not work with country boundary as well. I wonder if there is any solution to this problem or should I be using another approach / visual type to show data at sub-national level. 

Hi @Malick - Since auto-zoom and using the comp_key as a unique identifier for each sub-national location haven't resolved the issue, it might indeed be worth exploring alternative visuals or approaches.

alternatives like ArcGIS Maps for Power BI and Drill Down Map visuals are likely the most straightforward alternatives if automatic zooming with slicers is essential for you. These alternatives often provide better zooming and filtering at sub-national levels without extensive setup. Let me know if you'd like detailed guidance on any of these specific approaches!

 

Feel free to mark the right answer as solution and I wouldn't mind kudos. thank you





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks for the advice.  I'll appreciate if you can provide guidance or point me to the online resource on both atcgis and drill down maps usage in Power BI.

Hi @Malick - Please find the details.

Add the ArcGIS Maps for Power BI Visual:

Open Power BI Desktop and go to the Visualizations pane.
Look for the ArcGIS Maps for Power BI icon and click on it to add it to your report.
Prepare Your Data:

Ensure your dataset includes geographic data, such as Country, State/Province, or City.
For sub-national boundaries, you may have a column with unique identifiers for each region, such as comp_key for the specific areas within each country.
Configure the Location Field:

In the Location field well, add your location data (e.g., Country, Region, or comp_key for specific sub-national regions).
ArcGIS Maps will automatically recognize many geographic fields (such as country names or ISO codes) and assign locations accordingly.
Customize the Map with Layers and Filters:

Use the Layer List option to add data layers, such as boundary layers or points.
To zoom into a specific country or region based on slicer selection, ensure Auto Zoom is enabled in the map settings. This should allow the map to automatically adjust its zoom level when a filter is applied.
Use Boundaries and Styling Options:

In the Map tools section, you can choose Boundaries to show borders for countries, regions, or custom shapes.
Under the Symbology section, adjust the color scheme and range based on your severity scale (1–5).
Add Slicers:

Add a slicer to your report for filtering by country, region, or other fields.
When a selection is made, ArcGIS Maps for Power BI should zoom into the selected area if Auto Zoom is enabled.

 

Create an ArcGIS map in Power BI - Power BI | Microsoft Learn

https://www.youtube.com/watch?v=-izRcDYGR1g

 

Drill Down Map by ZoomCharts allows you to interactively drill down through different levels of geographic data, such as country, state, or region. This is a custom visual that needs to be added to your Power BI report.

https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa200002264?tab=overview

https://www.youtube.com/watch?v=91SW4J5rP1k

 

Drill Down Map by ZoomCharts offers a hierarchical drill-down feature that lets users manually explore different geographic levels. It’s not auto-zooming, but the drill-down interactivity can be useful for exploring detailed data.

 

Hope this helps 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.