Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi everyone,
I am using Azure Maps in Power BI, and I have multiple areas/polygons stored inside one single GeoJSON file. I want to allow the user to filter the report (for example using a slicer), so that only one area is displayed at a time.
The problem I’m facing is that Azure Maps still reads the full extent of the entire GeoJSON file, even when the data is filtered. So the map automatically zooms out to show all the shapes, which makes the visible area look extremely far away. In practice, the filtering hides the data, but not the underlying geometry that the zoom is calculated from.
My questions are:
Is there any workaround so that Azure Maps can zoom only to the selected area when using a single GeoJSON file?
Is it possible to define_zoom or center position dynamically based on the user selection?
If not, what would be the recommended approach?
Solved! Go to Solution.
Hello @Anonymous,
f this answer was helpful in any way, I would be pleased to receive a thumbs-up, as well as the satisfaction of seeing a DAX measure work for the first time without needing yet another FILTER.
Please mark it as the accepted solution. This helps other community members find the quickest path and saves them from another endless loop 🌀.
Today Azure Maps in Power BI cannot recalculate the zoom extent only from the filtered polygons of a single GeoJSON reference layer, so your behavior is expected.
Import the GeoJSON into your model (Get data → JSON), expand into a table with a column for the polygon geometry and a column for area name.
Use this table as the main data source (Location = geometry, Category/Legend = area name) so that slicers truly filter the underlying rows; the Azure Maps auto‑zoom then fits only the selected shapes, not the whole file.
Turn Auto zoom off in the Azure Maps visual and set a fixed zoom/center that works reasonably well for your typical areas.
Optionally, add helper measures or bookmarks that switch the map to predefined views (e.g. country, region) when users click buttons, but this still will not fully auto‑fit each polygon.
If you need precise “zoom to selected polygon” behaviour, a custom visual such as Icon Map or the Shape Map visual can load GeoJSON per region and auto‑zoom when filtered, which often behaves closer to what you want.
In short, the recommended approach is to load polygons as regular table data (data‑bound layer) instead of a single GeoJSON reference layer, so that cross‑filtering and auto‑zoom respect the user’s selection.
Hi @Anonymous
This happens because Azure Maps calculates zoom/extent based on the full GeoJSON geometry, even if you filter features. Filtering only hides the data; it doesn’t change the underlying geometry.
Workarounds:
Recommendation: Splitting the GeoJSON per area is usually the simplest way to get proper zoom for each selection.
i hope this help you
Hi @Anonymous ,
I would also take a moment to thank @Zanqueta , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Hi @Anonymous ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Hello @Anonymous,
f this answer was helpful in any way, I would be pleased to receive a thumbs-up, as well as the satisfaction of seeing a DAX measure work for the first time without needing yet another FILTER.
Please mark it as the accepted solution. This helps other community members find the quickest path and saves them from another endless loop 🌀.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 31 | |
| 24 | |
| 22 |
| User | Count |
|---|---|
| 133 | |
| 115 | |
| 56 | |
| 45 | |
| 40 |