Creating a map with polygons or other features
Follow one of the steps below to add polygons or other features to the features layer of the map. Note that the three ways of adding features (via GSS codes, geometry from your data, or by uploading a data file) are mutually exclusive; only one method can be used at a time.
Using ONS geographies
Creating a choropleth (or fill) map using Office for National Statistics (ONS) geographies — such as Lower layer Super Output Areas (LSOAs) and wards — in the OS Maps for Power BI Visual is straightforward and does not require a separate geometry file.
To make the following steps work, your data will need a column that includes ONS Government Statistical Service (GSS) codes.
GSS codes
GSS (Government Statistical Service) codes are nine-character alphanumeric codes which correspond to geographies that ONS supports, for example, an LSOA code looks like this: E01000917.
Examples of LSOA codes are shown in the table below:
E01000916
Camden 027B
E01000917
Camden 027C
E01000917
Camden 027C
E01000914
Camden 028B
To display these geographies as polygons on a map, simply drag and drop the column of data that has these codes into the Features Layer: GSS identifiers geocoding field of the visual.

Good to know
The data added to the Features Layer: GSS identifiers field will be sent out of the visual to services maintained by the Office for National Statistics, in order to retrieve the geometries.
The values you add are checked first to make sure they fit the format of a GSS code (a letter followed by 8 numbers). Any data mistakenly added to this field that doesn't match the format won't be sent out of the visual.
This feature makes use of the services published by the ONS Open Geography Portal and is subject to the availability and currency of those services. However once a geometry has been received and the report is saved, the information will be cached in the report for viewers.
The caching improves reliability and means that once retrieved, the polygons won't be re-requested by that copy of the visual.
Unrecognised codes
Not all types of GSS code are necessarily supported for geocoding. The visual makes use of services that are published in the ONS Open Geography Portal.
These are subject to change from time to time by ONS. The visual may be reconfigured to show new services as we are made aware of them. The table in the FAQs tab of the "Getting Started" dialog tells you which codes are currently supported.
The visual will only support the latest version of geometries for any particular code type. Historic codes are unfortunately NOT supported at this time.
Any codes for which a polygon could not be retrieved won’t display a polygon on the map. The notification panel will display what codes did not work.
Using geometries from the Power BI data model
If you have a column in your data that contains geometries in either WKT or GeoJSON format, you can add these to the Features Layer of the map by dragging that column to the "Features Layer: WKT or GeoJSON Geometries" field of the Build Visual pane.

More detailed information on how to import GeoJSON or other data into your Power BI data model can be found on the Importing GeoJSON or WKT to your data model page.
Note that you are not limited to using polygon geometries; points and lines also work.
Limitations
If your geometry is particularly complex, it may not fully display using this method due to an inherent limitation within Power BI. Possible workarounds are discussed on the Importing GeoJSON or WKT to your data model page. Alternatively you can upload a spatial dataset directly into the visual rather than adding it to the Power BI data model - see 'Uploading spatial data into the visual' below.
Uploading spatial data into the visual
You can also upload your own spatial data directly into the visual itself, and then link it to your Power BI data via a common attribute to allow data-driven styling of the features. You can upload data from a GeoJSON file, a TopoJSON file, or a shapefile. Note that you are not limited to using polygon geometries; points and lines also work.
To use this feature, first ensure that you have added some data to the visual on the Build Visual pane. You can add the Power BI data you want to join to your uploaded data, and / or any other columns of data.
Next go to Format Visual > Upload Geospatial Data and toggle on Show upload manager.

A dialog will appear in the visual allowing you to upload data from a file on your computer. Follow the steps in this Upload Manager dialog to upload you data to the visual. More information on this stage of the process can be found on the Loading spatial data into the visual page. Return to this page when you have followed the steps to upload the data.
Once you have used the Upload Manager to load data into your visual, the settings pane beneath the Upload Manager toggle will update to show the filename of the data you loaded, and the dropdown will show the names of the unique columns in the dataset:

You can now select which column you wish to join to the Power BI data model.
Then, if you have not already done so, add the corresponding column from your Power BI data to the Features Layer: Linking identifier to match in uploaded geometries field well. You should now see the features from your dataset that match a value in the Power BI data showing on the map.
You can also display features from the uploaded data which do not match the Power BI data, by simply selecting the appropriate toggle:

These unmatched features are symbolised separately with a single symbol (because they do not have Power BI data to drive their styling). More information is on the Styling features on the map page.
Last updated
Was this helpful?