How to Group Countries into Continents in Tableau

Cody Schneider8 min read

Building a world map in Tableau is one of the quickest ways to visualize your global data, but you’ll soon run into a common roadblock: Tableau recognizes countries, but not continents. If you want to see a high-level view of performance across continents - like comparing sales in Asia versus Europe - you'll need to teach Tableau how to group those countries yourself. This tutorial will walk you through the two best ways to group countries into continents, helping you create cleaner, more insightful maps.

Why Bother Grouping Countries in the First Place?

You might be wondering if it's worth the effort. In most cases, absolutely. Visualizing a metric for every single country at once can create a cluttered and overwhelming map. Grouping countries into continents simplifies your visualization and makes it easier for your audience to spot major trends. Instead of comparing the performance of 50+ individual European countries, you can instantly compare Europe's performance as a whole against North America's.

This approach helps you tell a clearer story by focusing on the big picture. It’s perfect for executive dashboards or any report where high-level insights are more valuable than granular details about every single country. Grouping paves the way for powerful actions like:

  • Comparing total revenue, user count, or costs across entire regions.
  • Using the continent group as a top-level filter for other charts in your dashboard.
  • Creating hierarchies that allow users to drill down from a continent view into a specific country.

Two Core Methods: Grouping vs. Calculated Fields

Tableau gives you two primary ways to create your continent groups. Neither is necessarily "better," but they serve different purposes, and one is significantly more flexible than the other.

  1. Tableau's Built-in Grouping Feature: This is a quick-and-dirty method that lets you visually select countries on a list and bundle them into groups. It’s fantastic for quick, one-off analyses where you just need to get the job done and don’t plan on reusing the logic elsewhere.
  2. Using a Calculated Field: This method involves writing a simple formula (specifically a CASE statement) to categorize each country. While it takes an extra minute to set up, it creates a new, reusable dimension in your data source. This makes it the superior choice for dashboards that will be used long-term or when you need your analysis to be more robust and scalable.

We'll walk through both step-by-step.

Method 1: Using Tableau's Built-in Grouping Feature

This is the most straightforward way to begin. Let's assume you have a dataset with a field called "Country."

Step 1: Locate and Right-Click Your "Country" Dimension

In the Data pane on the left side of your screen, find the dimension that contains your country names. It will likely have a small globe icon next to it, indicating that it’s a geographic field. Right-click on this dimension. From the context menu, navigate to Create > Group...

Step 2: Start Building Your Continent Groups

A new window labeled "Create Group" will pop up, displaying a list of all the countries in your dataset. Your job here is to select all the countries belonging to one continent and group them together.

For example, let's create a "North America" group. Hold the Ctrl key (or Cmd on Mac) and click to select Canada, United States, and Mexico from the list. Once they are all highlighted, click the "Group" button.

You'll see a new item appear in the list with the default name 'Canada, Mexico, United States &...'. You can click on this name and rename it to something clean and simple, like "North America."

Step 3: Repeat the Process for All Continents

Now, just repeat that process for the other continents. Select all the countries in Europe, click "Group," and rename the group "Europe." Do the same for Asia, South America, Africa, and Oceania/Australia. This part can be a bit tedious if you have many countries, but you only have to do it once.

Pro Tip: After you've created all your main continent groups, you may have some smaller territories or unrecognized locations left over. You can check the box for "Include 'Other'" at the bottom of the window to lump all remaining ungrouped items into a default 'Other' category. This is a handy way to ensure no data is left behind.

Step 4: Use Your New Group on a Map

Once you click "OK," you'll find a new field in your Data pane called "Country (group)." This is your new dimension!

To use it, first double-click your original Country dimension to create a world map. Then, drag the new Country (group) dimension directly onto the "Color" shelf in the Marks card. All the countries on your map will now be color-coded by the continent groups you just created.

Method 2: Creating a Calculated Field (The Recommended Way)

While grouping is fast, a calculated field is far more powerful and flexible. It creates a permanent, reusable dimension you can use in any worksheet, dashboard, or even other calculations.

Step 1: Create a New Calculated Field

In the Data pane, click the small dropdown arrow at the top and select "Create Calculated Field..." Alternatively, you can right-click anywhere in the empty space of the pane to find the same option.

Step 2: Write Your CASE Statement

Name your calculated field something intuitive, like "Continent." Now, it's time to write the formula. We'll use a CASE statement, which is a clean way to assign a category based on a condition - perfect for this task.

The logic is simple: CASE [Your Country Field] WHEN 'Some Country' THEN 'Its Continent'.

Below is a sample formula you can adapt. Just copy and paste this into the calculation editor and replace [Country] with the actual name of your country dimension, adding or removing countries as needed.

CASE [Country]
WHEN "United States" THEN "North America"
WHEN "Canada" THEN "North America"
WHEN "Mexico" THEN "North America"

WHEN "United Kingdom" THEN "Europe"
WHEN "Germany" THEN "Europe"
WHEN "France" THEN "Europe"
WHEN "Spain" THEN "Europe"
WHEN "Italy" THEN "Europe"
WHEN "Russia" THEN "Europe"

WHEN "China" THEN "Asia"
WHEN "India" THEN "Asia"
WHEN "Japan" THEN "Asia"
WHEN "South Korea" THEN "Asia"

WHEN "Brazil" THEN "South America"
WHEN "Argentina" THEN "South America"
WHEN "Colombia" THEN "South America"

WHEN "Nigeria" THEN "Africa"
WHEN "Egypt" THEN "Africa"
WHEN "South Africa" THEN "Africa"

WHEN "Australia" THEN "Oceania"
WHEN "New Zealand" THEN "Oceania"

ELSE "Other"
END

The ELSE "Other" line at the end is a great catch-all. Any country not explicitly listed in your WHEN statements will automatically be categorized as "Other." At the bottom of the calculation dialog, Tableau will say "The calculation is valid." Click "OK."

Step 3: Put Your New Calculation to Work

You now have a brand new "Continent" dimension in your Data pane. Using it is just like using the group we made earlier. First, double-click your original Country dimension to get your map on the worksheet. This tells Tableau to draw each individual country.

Next, find your newly created "Continent" calculated field and drag it onto the "Color" shelf in the Marks card. Instantly, your map will color all the countries according to the continents defined in your formula.

Which Method Should You Choose?

Picking the right method depends on your goal.

  • Choose Grouping if you are doing a quick, one-time analysis and won’t need to reuse the continent assignments for anything else. It's fast, visual, and requires zero code.
  • Choose a Calculated Field if you are building a dashboard for long-term use, need to reference the continent classification in other calculations (e.g., SUM(IF [Continent] = 'Europe' THEN [Sales] END)), or if your data updates frequently with new countries. It's more structured and infinitely more reusable.

Bonus Tip: Create a Geographic Hierarchy

Once you have your Continent field ready (whether from grouping or a calculation), you can make your map interactive by creating a hierarchy.

In the Data pane, simply drag your Country dimension directly onto your Continent dimension. Tableau will prompt you to create a hierarchy. Click "OK." Now you'll see a little "+" sign on the Continent pill when you use it on a worksheet. This allows you and your users to instantly drill down from the continent level to the country level, and drill back up, making for a much richer user experience.

Final Thoughts

Organizing raw country data into meaningful continent groups is a fundamental skill for anyone building global dashboards in Tableau. By using either the quick grouping feature for fast analysis or the more robust calculated field method for scalable reports, you can transform a cluttered map into a powerful, high-level business intelligence tool.

We know that even simple tasks like this can add up, becoming another manual step you have to remember across your reporting workflow. At Graphed, we automate the tedious parts of data analysis by allowing you to work with your data using natural language. Instead of manually creating groups or writing formulas, you can simply connect your data sources and ask questions like, "Show me a map of total users by continent for last year," and our AI instantly builds the interactive dashboard for you, saving you valuable time to focus on strategy, not configuration.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.