Learn

GeoJSON in Power BI

Power BI's Shape Map visual renders GeoJSON Polygon and MultiPolygon features as a choropleth. Each feature needs a name property that matches a column in your data table.

Enable Shape Map

Shape Map is a Preview feature and must be enabled before first use:

  1. Go to File → Options and Settings → Options → Preview Features.
  2. Check Shape map visual, then restart Power BI Desktop.
  3. The Shape Map icon appears in the Visualizations pane — it looks like a shaded region outline.

Prepare your GeoJSON

Before uploading your file, check three things:

  • The name property must exist on every feature. Power BI matches this field to your data column values. The match is case-sensitive and must be exact — "France" and "france" are treated as different regions.
  • Only Polygon and MultiPolygon geometries render. Point and LineString features are silently ignored. If you upload a mixed FeatureCollection, you'll see fewer regions than expected.
  • Keep the file under 1 MB. For world country maps, use a 110m resolution dataset (approximately 800 KB). The 10m version (~23 MB) will time out during upload.

If you're sourcing data from geojson-maps.ash.ms, select 110m for report use and 50m only when users will zoom into individual countries.

Add to a report

  1. Add a Shape Map visual to the report canvas by clicking its icon in the Visualizations pane.
  2. In the Format pane, go to Map settings → Custom map and click Browse. Select your .geojson file.
  3. Drag your location column (the one containing region names) to the Location field well.
  4. Drag your numeric column to Color saturation.

Power BI draws each region whose name property matches a value in the Location column. Unmatched features render as grey.

Rename the name property in Python

Most GeoJSON datasets don't use name as the key. Natural Earth data uses NAME; geojson-maps uses name_long; country datasets vary. The fastest fix is a short Python script:

import json

with open("countries.geojson") as f:
    fc = json.load(f)

for feat in fc["features"]:
    # Rename 'NAME' to 'name'
    feat["properties"]["name"] = feat["properties"].pop("NAME", "")

with open("countries-pbi.geojson", "w") as f:
    json.dump(fc, f)

Run this once, then upload countries-pbi.geojson to Power BI. You can adapt the pop("NAME", "") line to whatever key your source data uses.

Debug mismatched regions

If some regions render grey after uploading:

  1. Open the GeoJSON file in geojson.io — paste the contents or drag the file onto the map.
  2. Click a grey region's feature on the map. The sidebar shows its properties object with actual key names and values.
  3. Compare those values to your data column. A trailing space, a different encoding of an accented character (é vs e), or a different country name variant ("South Korea" vs "Korea, Republic of") breaks the join.

Fix the mismatch either by renaming the property in the GeoJSON (using the Python script above, adapted for the key you find) or by standardising values in your data table.

Property key reference for common datasets

DatasetName keyISO alpha-2 key
Natural Earth (geojson-maps 10m/50m)NAMEISO_A2
geojson-maps (all resolutions)nameiso_a2
@geo-maps/countries-landA3 (alpha-3 only)—
country-jsonnamealpha-2

When none of these match your data, the Python rename script is your fastest path.

Watch out: Shape Map is a Preview feature as of Power BI Desktop April 2026. Preview features can be removed or changed in future releases. If the visual disappears after an update, re-enable it in Options → Preview Features.

For the GeoJSON format reference — structure, coordinate order, and feature types — see What is GeoJSON?. For world country GeoJSON data sources, see World countries GeoJSON.

If you need to draw custom region boundaries (delivery zones, sales territories) rather than using a pre-made dataset, Element Editor's playground lets you draw polygons and export as GeoJSON.

Continue reading

Mike Acler

Mike Acler

Design engineer and creator of Element Editor, an open-source map drawing and GeoJSON editing library for React. Writes about web cartography and GIS tooling.