Mapping Continents and Countries in Power BI

Maps – they’re everywhere. We have instant access to detailed electronic maps directly from our phones, tablets, computers, and cars. For some, old and usually outdated maps are used as artwork to hang on walls. For others, the humongous folded paper maps found in a car door side pocket are still the go-to map when electronic maps are not available (just remember to update it periodically as roads may have changed during the past 50 years). From a technology standpoint, the coronavirus pandemic demonstrated the critically important need for digital mapping services. Maps relayed information about COVID-19 case levels, hospitalizations, deaths, and vaccine availability in a familiar and easy-to-use visualization. Vast amounts of data from all over the world were consolidated and made available at aggregate global and granular local levels through maps.

Given the ubiquity of maps, I incorrectly assumed that including a map visualization in Power BI would be a simple exercise. Well, adding the visual itself is very easy, but having the data rendered correctly is not as straightforward. This isn’t entirely the fault of Power BI (there are some Power BI specific issues). I was quickly reminded that the world is a complicated place. Continents, regions, countries, and cities may be referred to by different names. Complex geopolitical factors play into the recognition of a country as a sovereign entity or as a territory of another entity. There are disputed lands that may or may not be recognized as sovereign entities or they may be considered parts of multiple different countries depending on political perspective. Even assigning a particular country to a continent is not simple since some countries span multiple continents while other countries bordering multiple continents may prefer to be recognized as part of one continent over another regardless of geological assignment.

In short, mapping is a challenging exercise no matter what service is used. As I mentioned earlier, these challenges are not specific to Power BI. As a Microsoft product, Power BI uses Bing for its mapping services. This adds another layer of complexity since Bing may recognize locations differently than Google Maps or any other service in terms of location naming, borders, and political recognition. From a continent and country naming perspective, the examples below were tested with Power BI.

Enabling Map Visuals in Power BI

Power BI map visualizations are not enabled by default due to security reasons. Data used to render maps in Power BI are transmitted externally since Power BI uses Bing as its mapping service. If the report or dashboard contains sensitive information that should not be transmitted externally, you may want to consider an alternate solution.

To use the Map or Filled Map visualizations, you may need to enable a security option if the error “Map and filled map visuals are disabled” is displayed (screenshot below).

  1. From the Power BI application menu, click File.
  2. Click Options and settings.
  3. Click Options. The Options window is displayed.
  4. Within the Global section, click Security.
  5. In the list of Security options, find the Map and Filled Map visuals section and enable the Use Map and Filled Map visuals option.
  6. Click the OK button to close the Options window.
Power BI – Map Security Error
Power BI – Map Security Error

Continents

The seven continents recognized by Power BI are listed below. Please be aware that the terms Australia and Oceania are not interchangeable with respect to recognized continent names. As an example, the term Australia when used as a continent name in Power BI does not fill New Zealand on a Filled Map visualization. However, the term Oceania, when set to the Data category of Continent, does fill New Zealand. My understanding is that Oceania is considered a region instead of a continent even though the terms are used interchangeably in some parts of the world.

  • Africa
  • Antarctica
  • Asia
  • Australia
  • Europe
  • North America
  • South America

Columns containing continent names should be set to the Continent data category. Click on the field containing continent names. On the Column tools menu for that column, set the Data category to Continent.

Power BI – Data Category Continents
Power BI – Data Category Continents

Map Visualization Using Continent Names

Using the listed continent names, a Map visualization places the bubbles at a central point in the expected locations.

Power BI – Continents
Power BI – Continents

Filled Map Visualization Using Continent Names

Using a Filled Map visualization instead of a Map visualization produces some unexpected results. All of the continents are filled as expected, however, Asia appears to be filled more than once since it has a darker fill color in the following screenshot. Hovering over Asia displays the label Europe. It seems Asia is filled based on both the Asia and Europe continent names.

Power BI – Continents (Filled)
Power BI – Continents (Filled)

Another peculiarity with the Filled Map visualization is that some island nations and territories are not filled when using continent names. As an example, Cuba, Haiti, and Dominican Republic are filled as expected but Jamaica is not filled.

Power BI – Unfilled Islands
Power BI – Unfilled Islands

Countries

Mapping country data is where the process starts to become really interesting and problematic. I searched for a reference list of valid country names for Power BI and could not find a single, consistent reference. Without delving into geopolitics, there are many partially recognized countries, disputed lands, and territories. Countries found on one reference list may not be found on other lists if the country/sovereign is not recognized by the organization maintaining the list. Also, simply finding a country listed on a country reference list does not guarantee that Power BI recognizes the country as part of its mapping service with Bing. Let’s not forget that naming is not consistent either as countries tend to have various official and unofficial names that may or may not be recognized by Power BI or Bing. Is it the United States of America or United States or U.S. or U.S.A. or America?

In no way do any of the following country name lists represent an official or accurate or complete country name reference. They only serve to provide a list of tested names (at the time this was written) that are generally recognized by the Power BI mapping service when the Data category is set to Country. From the reference lists I found, these country names were commonly found as recognized countries. If you think a country name is missing, then feel free to add it to your report and make sure it is recognized by Power BI. If you feel a country belongs to Asia instead of Europe, then please make that adjustment in your report and test.

I also included a list of additional names that the Power BI mapping service recognizes when the Data category is set to Country. Again, this is not an accurate or complete list so please use it with caution, e.g., Puerto Rico is recognized when categorized as a Country in Power BI but it is regarded as a territory of the United States. Generally, these entries tend to be islands, partially recognized states, disputed lands, territories of other countries, etc.

Power BI – Countries
Power BI – Countries

Columns containing country names should be set to the Country data category. Click on the field containing country names. On the Column tools menu for that column, set the Data category to Country.

Power BI – Data Category Country
Power BI – Data Category Country

Africa

There are 54 countries associated with Africa as listed below. The Map visualization is rendered as expected, however, the Filled Map visualization appears to have unfilled areas in Sudan and South Sudan along with a few surrounding islands and territories.

  • Algeria
  • Angola
  • Benin
  • Botswana
  • Burkina Faso
  • Burundi
  • Cameroon
  • Cape Verde
  • Central African Republic
  • Chad
  • Comoros
  • Côte d’Ivoire
  • Democratic Republic of the Congo
  • Djibouti
  • Egypt
  • Equatorial Guinea
  • Eritrea
  • Eswatini
  • Ethiopia
  • Gabon
  • Ghana
  • Guinea
  • Guinea-Bissau
  • Kenya
  • Lesotho
  • Liberia
  • Libya
  • Madagascar
  • Malawi
  • Mali
  • Mauritania
  • Mauritius
  • Morocco
  • Mozambique
  • Namibia
  • Niger
  • Nigeria
  • Republic of the Congo
  • Rwanda
  • São Tomé and Príncipe
  • Senegal
  • Seychelles
  • Sierra Leone
  • Somalia
  • South Africa
  • South Sudan
  • Sudan
  • Tanzania
  • The Gambia
  • Togo
  • Tunisia
  • Uganda
  • Zambia
  • Zimbabwe
Power BI – Africa
Power BI – Africa
Power BI – Africa (Filled)
Power BI – Africa (Filled)

Asia

There are 47 countries associated with Asia as listed below. The Map visualization is rendered as expected, however, the Filled Map visualization appears to have unfilled areas along the border of China with India, Kyrgyzstan, and Kazakhstan as well as unfilled surrounding islands and territories. There are also unfilled areas with respect to Israel and Palestine.

  • Afghanistan
  • Armenia
  • Azerbaijan
  • Bahrain
  • Bangladesh
  • Bhutan
  • Brunei
  • Cambodia
  • China
  • Cyprus
  • Georgia
  • India
  • Indonesia
  • Iran
  • Iraq
  • Israel
  • Japan
  • Jordan
  • Kazakhstan
  • Kuwait
  • Kyrgyzstan
  • Laos
  • Lebanon
  • Malaysia
  • Maldives
  • Mongolia
  • Myanmar
  • Nepal
  • North Korea
  • Oman
  • Pakistan
  • Philippines
  • Qatar
  • Saudi Arabia
  • Singapore
  • South Korea
  • Sri Lanka
  • Syria
  • Tajikistan
  • Thailand
  • Timor-Leste
  • Turkey
  • Turkmenistan
  • United Arab Emirates
  • Uzbekistan
  • Vietnam
  • Yemen
Power BI – Asia
Power BI – Asia
Power BI – Asia (Filled)
Power BI – Asia (Filled)

Australia

There are 14 countries associated with Australia as listed below. Both the Map and Filled Map visualizations appear to be rendered as expected.

  • Australia
  • Federated States of Micronesia
  • Fiji
  • Kiribati
  • Marshall Islands
  • Nauru
  • New Zealand
  • Palau
  • Papua New Guinea
  • Samoa
  • Solomon Islands
  • Tonga
  • Tuvalu
  • Vanuatu
Power BI – Australia
Power BI – Australia
Power BI – Australia (Filled)
Power BI – Australia (Filled)

Europe

There are 44 countries associated with Europe as listed below. The Map visualization is rendered as expected, however, the Filled Map visualization appears to double-count Italy as represented by a darker fill color. I assume this is due to Vatican City existing within Italian borders.

  • Albania
  • Andorra
  • Austria
  • Belarus
  • Belgium
  • Bosnia and Herzegovina
  • Bulgaria
  • Croatia
  • Czechia
  • Denmark
  • Estonia
  • Finland
  • France
  • Germany
  • Greece
  • Hungary
  • Iceland
  • Ireland
  • Italy
  • Latvia
  • Liechtenstein
  • Lithuania
  • Luxembourg
  • Malta
  • Moldova
  • Monaco
  • Montenegro
  • Netherlands
  • North Macedonia
  • Norway
  • Poland
  • Portugal
  • Romania
  • Russia
  • San Marino
  • Serbia
  • Slovakia
  • Slovenia
  • Spain
  • Sweden
  • Switzerland
  • Ukraine
  • United Kingdom
  • Vatican City
Power BI – Europe
Power BI – Europe
Power BI – Europe (Filled)
Power BI – Europe (Filled)

North America

There are 22 countries associated with North America as listed below. Both the Map and Filled Map visualizations appear to be rendered as expected.

  • Antigua and Barbuda
  • Bahamas
  • Barbados
  • Belize
  • Canada
  • Costa Rica
  • Cuba
  • Dominica
  • Dominican Republic
  • El Salvador
  • Grenada
  • Guatemala
  • Haiti
  • Honduras
  • Jamaica
  • Mexico
  • Nicaragua
  • Panama
  • Saint Kitts and Nevis
  • Saint Lucia
  • Saint Vincent and the Grenadines
  • United States
Power BI – North America
Power BI – North America
Power BI – North America (Filled)
Power BI – North America (Filled)

South America

There are 13 countries associated with South America as listed below. The Map visualization is rendered as expected. The Filled Map visualization has a strange blank square area within Brazil but otherwise appears as expected.

  • Argentina
  • Bolivia
  • Brazil
  • Chile
  • Colombia
  • Ecuador
  • Guyana
  • Paraguay
  • Peru
  • Suriname
  • Trinidad and Tobago
  • Uruguay
  • Venezuela
Power BI – South America
Power BI – South America
Power BI – South America (Filled)
Power BI – South America (Filled)

Other Countries, Territories, and Lands

Listed below are 51 other possible countries, territories, islands, and lands which may or may not be sovereign countries, however, Power BI and Bing recognize the names and renders them on map visualizations when the Data category is set to Country.

  • American Samoa
  • Anguilla
  • Antarctica
  • Aruba
  • Bermuda
  • Bonaire
  • Bouvet Island
  • British Indian Ocean Territory
  • British Virgin Islands
  • Cayman Islands
  • Christmas Island
  • Cocos (Keeling) Islands
  • Cook Islands
  • Curaçao
  • Falkland Islands
  • Faroe Islands
  • French Guiana
  • French Polynesia
  • French Southern and Antarctic Lands
  • Gibraltar
  • Greenland
  • Guadeloupe
  • Guam
  • Guernsey
  • Heard Island and McDonald Islands
  • Hong Kong
  • Isle of Man
  • Jersey
  • Kosovo
  • Macao
  • Martinique
  • Mayotte
  • Montserrat
  • New Caledonia
  • Niue
  • Norfolk Island
  • Northern Mariana Islands
  • Pitcairn Islands
  • Puerto Rico
  • Réunion
  • Saint Barthelemy
  • Saint Helena, Ascension and Tristan Da Cunha
  • Saint Martin
  • Saint Pierre and Miquelon
  • Sint Maarten
  • South Georgia and South Sandwich Islands
  • Svalbard
  • Taiwan
  • Tokelau
  • Turks and Caicos
  • Wallis and Futuna
Power BI – Other Countries and Territories
Power BI – Other Countries and Territories

Further Reading

For additional information on Power BI mapping, please consider reading the related post discussing Mapping Cities in Power BI.