Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
APPLIES TO:
Power BI Desktop
Power BI service
Note
The Azure Maps visual is now generally available, except for in sovereign clouds. When you open a report with an existing map visual, if Azure Maps is enabled for your organization, you see a message encouraging you to upgrade your maps and filled maps to Azure Maps. In a future release, Power BI plans to deprecate older map visuals and migrate existing reports to Azure Maps. You can convert maps and filled maps to Azure Maps visuals now. This excludes sovereign clouds.
Create a Shape map visual to compare regions on a map using color. Unlike the Map visual, Shape map doesn't show precise geographical locations of data points on a map. Instead, its main purpose is to compare regions on a map by coloring them differently.
You can only add the Shape map visual to a report in Power BI Desktop. The visual appears in the report when you publish it to the web or use the Power BI mobile app.
Since it's in preview, you must enable it before you can use it. To enable Shape map, select File > Options and Settings > Options > Preview Features, and then select the Shape map visual checkbox. You need to restart Power BI Desktop after you make the selection.
Create a shape map
You can test the Shape map control with the maps that ship with this preview release, or you can use your own custom map as long as it meets the requirements outlined in the following section called Use custom maps. Shape map visuals are based on maps that you can find on the Internet, create yourself, or convert to the TopoJSON format. Examples of custom maps are: geographical, seating arrangements, floor plans, and others.
Enable the shape map visual (preview)
- In Power BI Desktop, select File > Options and settings > Options.
- Under Global > Preview features, select Shape map visual.
- Select OK, and then restart Power BI Desktop for the change to take effect.
Add a shape map visual
- Open or create a report in Power BI Desktop.
- In the Visualizations pane, select the Shape map icon to add an empty visual to the canvas.
- (Optional) Resize the visual so it's large enough to view region shading clearly.
Power BI Desktop adds an empty Shape map visual to the report canvas.
Build the shape map
Note
In the Region keys section, there are tables of map region keys you can use to follow these steps.
Select the empty Shape map visual.
In the Fields pane, drag a geographic field to the Location well (for example, State, Region, or District).
Drag a numeric measure (for example, Sales, Population) to the Color saturation well.
With the visual still selected, open the Format pane (paint roller icon) and expand Map settings.
Choose a Map type (for example, Italy, Mexico, USA) from the dropdown.
In the Format pane, expand Map settings, and change the Map type. In this example, select Italy.
To display the map keys of the currently selected map, select View map type key. In this example, use a map of Mexico and the Map keys displays the values being used to build the map.
Choose which way to display a three-dimensional object (the earth) as a two-dimensional map using the Projection dropdown.
- Equirectangular: Cylindrical projection that converts the globe into a grid with each rectangular cell having the same size, shape, and area.
- Mercator: Cylindrical projection with the equator depicted as the line of tangency. Polar areas are more distorted than Equirectangular projections.
- Orthographic: A projection from an infinite point, as if from deep space. It gives the illusion of a three-dimensional globe.
For more detailed information, see Esri map projections reference.
(Optional) Add a categorical field to Legend to classify the map regions by category.
(Optional) In Format pane > Data colors, adjust the palette and other settings such as Default color and Zoom.
Note
If you don’t see Map settings, make sure the Shape map visual is selected. If Map type shows only Blank, confirm the preview feature is enabled and restart Power BI Desktop.
Use custom maps
You can test the built-in map types or use your own custom map as long as it meets the requirements outlined in Load a custom TopoJSON map. Shape map visuals are based on maps you can find, create, or convert to the TopoJSON format (for example: geographical regions, seating layouts, floor plans).
Load a custom TopoJSON map
- Add or select a Shape map visual.
- Open the Format pane and expand Map settings.
- In Map type, select Custom map.
- Select Add a map type.
- Browse to and select your .topojson file, and then select Open.
- (Optional) Select View map type key to verify that the region names or IDs match your Location field values.
Sample custom map
The Offices of the United States Attorneys release an annual fiscal report on their litigation and caseload data. We convert some of their district data into .json files and add them to this sample PBIX.
Custom shape map demo .PBIX file
If you want to experiment with custom maps, download this PBIX file and follow along.
From Power BI Desktop, select File > Open report.
Since states can be divided into multiple districts, you need to use a custom shape map for districts. By importing the TopoJSON map of the U.S. judicial districts into Power BI Desktop, you can visualize the annual fiscal district attorney data. The following image uses a custom map named 2000_districts_extra_simplified_CONUS.json file.
You can do interesting things with the individual state maps and show more detail based on the districts they contain.
Get map data
To quickly get data into a model to test Shape map, copy one of the tables at the end of this article, and then select Enter data from the Home ribbon.
In this example, select the data for Mexico and paste it into Desktop by using Enter data. The top row is automatically identified as a header.
Enter a new column by typing a new column name in the blank column to the right. Add values in each cell just like you can do in Excel. When finished, select Load. The table is added to the data model for Power BI Desktop.
Note
When working with countries/regions, use the three-letter abbreviation to ensure that geocoding works properly in map visualizations. Don't use two-letter abbreviations, as some countries/regions might not be properly recognized.
If you only have two-letter abbreviations, check out this external blog post for steps on how to associate your two-letter country/region abbreviations with three-letter country/region abbreviations.
Preview behavior and requirements
Consider the following requirements and limitations for this Preview release of Shape map:
- If the Shape map visual is still marked preview in your build, you must enable it (see Enable the Shape map visual).
- Currently, the Color saturation bucket must be set for the Legend classification to work properly.
- The Shape map visual plots up to a maximum of 1,500 data points.
Region keys
Use the following Region keys in this preview release to test Shape map.
Australia: States
| ID | Abbreviation | ISO | Name | Postal |
|---|---|---|---|---|
au-wa |
WA |
AU-WA |
Western Australia |
WA |
au-vic |
Vic |
AU-VIC |
Victoria |
VIC |
au-tas |
Tas |
AU-TAS |
Tasmania |
TAS |
au-sa |
SA |
AU-SA |
South Australia |
SA |
au-qld |
Qld |
AU-QLD |
Queensland |
QLD |
au-nt |
NT |
AU-NT |
Northern Territory |
NT |
au-nsw |
NSW |
AU-NSW |
New South Wales |
NSW |
au-act |
ACT |
AU-ACT |
Australian Capital Territory |
ACT |
Austria: States
| ID | ISO | Name | English name | Postal |
|---|---|---|---|---|
at-wi |
AT-9 |
Wien |
Vienna |
WI |
at-vo |
AT-8 |
Vorarlberg |
Vorarlberg |
VO |
at-tr |
AT-7 |
Tirol |
Tyrol |
TR |
at-st |
AT-6 |
Steiermark |
Styria |
ST |
at-sz |
AT-5 |
Salzburg |
Salzburg |
SZ |
at-oo |
AT-4 |
Oberösterreich |
Upper Austria |
OO |
at-no |
AT-3 |
Niederösterreich |
Lower Austria |
NO |
at-ka |
AT-2 |
Kärnten |
Carinthia |
KA |
at-bu |
AT-1 |
Burgenland |
Burgenland |
BU |
Brazil: States
| ID |
|---|
Tocantins |
Pernambuco |
Goiás |
Sergipe |
São Paulo |
Santa Catarina |
Roraima |
Rondônia |
Rio Grande do Sul |
Rio Grande do Norte |
Rio de Janeiro |
Piauí |
Paraná |
Paraíba |
Pará |
Minas Gerais |
Mato Grosso |
Maranhão |
Mato Grosso do Sul |
Distrito Federal |
Ceará |
Espírito Santo |
Bahia |
Amazonas |
Amapá |
Alagoas |
Acre |
Litigated Zone 1 |
Litigated Zone 2 |
Litigated Zone 3 |
Litigated Zone 4 |
Canada: Provinces
| ID | ISO | Name | Postal |
|---|---|---|---|
ca-nu |
CA-NU |
Nunavut |
NU |
ca-nt |
CA-NT |
Northwest Territories |
NT |
ca-yt |
CA-YT |
Yukon |
YT |
ca-sk |
CA-SK |
Saskatchewan |
SK |
ca-qc |
CA-QC |
Quebec |
QC |
ca-pe |
CA-PE |
Prince Edward Island |
PE |
ca-on |
CA-ON |
Ontario |
ON |
ca-ns |
CA-NS |
Nova Scotia |
NS |
ca-nl |
CA-NL |
Newfoundland and Labrador |
NL |
ca-nb |
CA-NB |
New Brunswick |
NB |
ca-mb |
CA-MB |
Manitoba |
MB |
ca-bc |
CA-BC |
British Columbia |
BC |
ca-ab |
CA-AB |
Alberta |
AB |
France: Regions
| ID | Name | English name |
|---|---|---|
Auvergne-Rhone-Alpes |
||
Bourgogne-Franche-Comte |
||
Bretagne |
Bretagne |
|
Centre-Val de Loire |
Centre-Val de Loire |
Centre-Val de Loire |
Corse |
Corse |
Corsica |
Grand Est |
||
Guadeloupe |
||
Hauts-de-France |
||
Ile-de-France |
Île-de-France |
Ile-de-France |
La Reunion |
||
Mayotte |
||
Normandie |
Normandie |
|
Nouvelle-Aquitaine |
||
Occitanie |
||
Pays de la Loire |
Pays de la Loire |
Pays de la Loire |
Provence-Alpes-Cote d'Azur |
Provence-Alpes-Côte d'Azur |
Provence-Alpes-Cote d'Azur |
Germany: States
| ID | ISO | Name | English name | Postal |
|---|---|---|---|---|
de-be |
DE-BE |
Berlin |
Berlin |
BE |
de-th |
DE-TH |
Thüringen |
Thuringia |
TH |
de-st |
DE-ST |
Sachsen-Anhalt |
Saxony-Anhalt |
ST |
de-sn |
DE-SN |
Sachsen |
Saxony |
SN |
de-mv |
DE-MV |
Mecklenburg-Vorpommern |
Mecklenburg-Vorpommern |
MV |
de-bb |
DE-BB |
Brandenburg |
Brandenburg |
BB |
de-sh |
DE-SH |
Schleswig-Holstein |
Schleswig-Holstein |
SH |
de-sl |
DE-SL |
Saarland |
Saarland |
SL |
de-rp |
DE-RP |
Rheinland-Pfalz |
Rhineland-Palatinate |
RP |
de-nw |
DE-NW |
Nordrhein-Westfalen |
North Rhine-Westphalia |
NW |
de-ni |
DE-NI |
Niedersachsen |
Lower Saxony |
NI |
de-he |
DE-HE |
Hessen |
Hesse |
HE |
de-hh |
DE-HH |
Hamburg |
Hamburg |
HH |
de-hb |
DE-HB |
Bremen |
Bremen |
HB |
de-by |
DE-BY |
Bayern |
Bavaria |
BY |
de-bw |
DE-BW |
Baden-Württemberg |
Baden-Wurttemberg |
BW |
Ireland: Counties
| ID |
|---|
Wicklow |
Wexford |
Westmeath |
Waterford |
Sligo |
Tipperary |
Roscommon |
Offaly |
Monaghan |
Meath |
Mayo |
Louth |
Longford |
Limerick |
Leitrim |
Laoighis |
Kilkenny |
Kildare |
Kerry |
Galway |
Dublin |
Donegal |
Cork |
Clare |
Cavan |
Carlow |
Italy: Regions
| ID | ISO | Name | English name | Postal |
|---|---|---|---|---|
it-vn |
IT-34 |
Veneto |
Veneto |
VN |
it-vd |
IT-23 |
Valle d'Aosta |
Aosta Valley |
VD |
it-um |
IT-55 |
Umbria |
Umbria |
UM |
it-tt |
IT-32 |
Trentino-Alto Adige |
Trentino-South Tyrol |
TT |
it-tc |
IT-52 |
Toscana |
Tuscany |
TC |
it-sc |
IT-82 |
Sicilia |
Sicily |
SC |
it-sd |
IT-88 |
Sardegna |
Sardinia |
SD |
it-pm |
IT-21 |
Piemonte |
Piedmont |
PM |
it-ml |
IT-67 |
Molise |
Molise |
ML |
it-mh |
IT-57 |
Marche |
Marche |
MH |
it-lm |
IT-25 |
Lombardia |
Lombardy |
LM |
it-lg |
IT-42 |
Liguria |
Liguria |
LG |
it-lz |
IT-62 |
Lazio |
Lazio |
LZ |
it-fv |
IT-36 |
Friuli-Venezia Giulia |
Friuli-Venezia Giulia |
FV |
it-er |
IT-45 |
Emilia-Romagna |
Emilia-Romagna |
ER |
it-cm |
IT-72 |
Campania |
Campania |
CM |
it-lb |
IT-78 |
Calabria |
Calabria |
LB |
it-bc |
IT-77 |
Basilicata |
Basilicata |
BC |
it-pu |
IT-75 |
Apulia |
Puglia |
PU |
it-ab |
IT-65 |
Abruzzo |
Abruzzo |
AB |
Mexico: States
| ID | Abbreviation | ISO | Name | English name | Postal |
|---|---|---|---|---|---|
mx-zac |
Zac. |
MX-ZAC |
Zacatecas |
Zacatecas |
ZA |
mx-yuc |
Yuc. |
MX-YUC |
Yucatán |
Yucatan |
YU |
mx-ver |
Ver. |
MX-VER |
Veracruz |
Veracruz |
VE |
mx-tla |
Tlax. |
MX-TLA |
Tlaxcala |
Tlaxcala |
TL |
mx-tam |
Tamps. |
MX-TAM |
Tamaulipas |
Tamaulipas |
TM |
mx-tab |
Tab. |
MX-TAB |
Tabasco |
Tabasco |
TB |
mx-son |
Son. |
MX-SON |
Sonora |
Sonora |
SO |
mx-sin |
Sin. |
MX-SIN |
Sinaloa |
Sinaloa |
SI |
mx-slp |
S.L.P. |
MX-SLP |
San Luis Potosí |
San Luis Potosi |
SL |
mx-roo |
Q.R. |
MX-ROO |
Quintana Roo |
Quintana Roo |
QR |
mx-que |
Qro. |
MX-QUE |
Querétaro |
Queretaro |
QE |
mx-pue |
Pue. |
MX-PUE |
Puebla |
Puebla |
PU |
mx-oax |
Oax. |
MX-OAX |
Oaxaca |
Oaxaca |
OA |
mx-nle |
N.L. |
MX-NLE |
Nuevo León |
Nuevo Leon |
NL |
mx-nay |
Nay. |
MX-NAY |
Nayarit |
Nayarit |
NA |
mx-mor |
Mor. |
MX-MOR |
Morelos |
Morelos |
MR |
mx-mic |
Mich. |
MX-MIC |
Michoacán |
Michoacan |
MC |
mx-mex |
Méx. |
MX-MEX |
Estado de México |
Mexico State |
MX |
mx-jal |
Jal. |
MX-JAL |
Jalisco |
Jalisco |
JA |
mx-hid |
Hgo. |
MX-HID |
Hidalgo |
Hidalgo |
HI |
mx-gro |
Gro. |
MX-GRO |
Guerrero |
Guerrero |
GR |
mx-gua |
Gto. |
MX-GUA |
Guanajuato |
Guanajuato |
GT |
mx-dur |
Dgo. |
MX-DUR |
Durango |
Durango |
DU |
mx-dif |
CDMX. |
MX-DIF |
Ciudad de México |
Mexico City |
DF |
mx-col |
Col. |
MX-COL |
Colima |
Colima |
CL |
mx-coa |
Coah. |
MX-COA |
Coahuila |
Coahuila |
CA |
mx-chh |
Chih. |
MX-CHH |
Chihuahua |
Chihuahua |
CH |
mx-chp |
Chis. |
MX-CHP |
Chiapas |
Chiapas |
CP |
mx-cam |
Camp. |
MX-CAM |
Campeche |
Campeche |
CM |
mx-bcs |
B.C.S. |
MX-BCS |
Baja California Sur |
Baja California Sur |
BS |
mx-bcn |
B.C. |
MX-BCN |
Baja California |
Baja California |
BN |
mx-agu |
Ags. |
MX-AGU |
Aguascalientes |
Aguascalientes |
AG |
Netherlands: Provinces
| ID | ISO | Name | English name |
|---|---|---|---|
nl-zh |
NL-ZH |
Zuid-Holland |
South Holland |
nl-ze |
NL-ZE |
Zeeland |
Zeeland |
nl-ut |
NL-UT |
Utrecht |
Utrecht |
nl-ov |
NL-OV |
Overijssel |
Overijssel |
nl-nh |
NL-NH |
Noord-Holland |
North Holland |
nl-nb |
NL-NB |
Noord-Brabant |
North Brabant |
nl-li |
NL-LI |
Limburg |
Limburg |
nl-gr |
NL-GR |
Groningen |
Groningen |
nl-ge |
NL-GE |
Gelderland |
Gelderland |
nl-fr |
NL-FR |
Fryslân |
Friesland |
nl-fl |
NL-FL |
Flevoland |
Flevoland |
nl-dr |
NL-DR |
Drenthe |
Drenthe |
UK: Countries/Regions
| ID | ISO | Name |
|---|---|---|
gb-wls |
GB-WLS |
Wales |
gb-sct |
GB-SCT |
Scotland |
gb-nir |
GB-NIR |
Northern Ireland |
gb-eng |
GB-ENG |
England |
USA: States
| ID | Name | Postal |
|---|---|---|
us-mi |
Michigan |
MI |
us-ak |
Alaska |
AK |
us-hi |
Hawaii |
HI |
us-fl |
Florida |
FL |
us-la |
Louisiana |
LA |
us-ar |
Arkansas |
AR |
us-sc |
South Carolina |
SC |
us-ga |
Georgia |
GA |
us-ms |
Mississippi |
MS |
us-al |
Alabama |
AL |
us-nm |
New Mexico |
NM |
us-tx |
Texas |
TX |
us-tn |
Tennessee |
TN |
us-nc |
North Carolina |
NC |
us-ok |
Oklahoma |
OK |
us-az |
Arizona |
AZ |
us-mo |
Missouri |
MO |
us-va |
Virginia |
VA |
us-ks |
Kansas |
KS |
us-ky |
Kentucky |
KY |
us-co |
Colorado |
CO |
us-md |
Maryland |
MD |
us-wv |
West Virginia |
WV |
us-de |
Delaware |
DE |
us-dc |
District of Columbia |
DC |
us-il |
Illinois |
IL |
us-oh |
Ohio |
OH |
us-ca |
California |
CA |
us-ut |
Utah |
UT |
us-nv |
Nevada |
NV |
us-in |
Indiana |
IN |
us-nj |
New Jersey |
NJ |
us-ri |
Rhode Island |
RI |
us-ct |
Connecticut |
CT |
us-pa |
Pennsylvania |
PA |
us-ny |
New York |
NY |
us-ne |
Nebraska |
NE |
us-ma |
Massachusetts |
MA |
us-ia |
Iowa |
IA |
us-nh |
New Hampshire |
NH |
us-or |
Oregon |
OR |
us-mn |
Minnesota |
MN |
us-vt |
Vermont |
VT |
us-id |
Idaho |
ID |
us-wi |
Wisconsin |
WI |
us-wy |
Wyoming |
WY |
us-sd |
South Dakota |
SD |
us-nd |
North Dakota |
ND |
us-me |
Maine |
ME |
us-mt |
Montana |
MT |
us-wa |
Washington |
WA |