Build an Interactive Drilldown Map in Tableau

Intermediate
30-45 minutes
Tableau Desktop
May 31, 2020

‍From regions to states to counties, all with a click.

Maps are great for showing where something is happening. But what if your audience wants to explore further into that location?

In this tutorial, we'll build an interactive Tableau map that lets users move from a regional overview to individual states and counties, then navigate back without losing their place.

We'll combine set actions, parameter actions, and a few clever calculations to create a seamless experience.

What you'll learn

  • Expand a region to reveal its states.
  • Click a state to explore county-level data.
  • Add breadcrumbs so users can navigate back.
  • Keep colors, legends, and tooltips consistent as the view changes.

The result: A map that encourages exploration without making users work harder to find answers.

Before You Begin

We'll use Tableau's sample Obesity data from the Regional workbook to build a map that moves between regions, states, and counties.

What you'll need

  • Tableau Desktop
  • The Regional sample workbook, or a dataset with geographic detail
  • A measure to visualize, such as an obesity or health statistic

Your data should include

  • Region: Our starting geographic view
  • State: The first level of drilldown
  • County: The most detailed map
  • Measure: The values displayed using color

Don't have a Region field? No problem. You can create one from your state data.

A little flexibility: If your dataset doesn't include counties, you can adapt the technique to another geographic level, such as cities or postal codes.

How it works

We'll use set actions to expand selected regions, parameter actions to switch between map views, and a few calculations to keep everything connected.

Ready? Let's build it.

‍

Step 1: Create Your Regional Map

Let's start with the big picture: a map of the United States grouped into regions.

1. Give Region a geographic role

In Tableau's Data pane:

  1. Right-click Region.
  2. Select Geographic Role → Create From → State.

This tells Tableau how to draw your custom regions using their underlying states.

2. Build the map

  1. Open a new worksheet.
  2. Drag Region to Detail on the Marks card.
  3. Drag your measure to Color.

Tip: If you hold the right mouse button instead of the left mouse button when you select and drop the measure, a window will pop up that allows you to choose the aggregation of the measure.

Image preview

‍

For this example, we're using Health Measure Selected, a calculation that allows users to switch between health statistics.

3. Check your result

You should now see a map of the United States with regions colored according to your selected measure.

That's our starting point! Next, we'll make those regions interactive.

Step 2: Drill Down from Region to State

Right now, our map displays regions. Let's give users a way to explore the states inside them.

We'll use a set to track which region is selected and a calculation to reveal its states.

1. Create a Region set

In Tableau's Data pane:

  1. Right-click Region.
  2. Select Create → Set.
  3. Name the set Region Selected.
  4. Click OK.

This set will identify which region we want to expand.

‍

2. Create the drilldown calculation

Create a calculated field named Drill to State and enter:

IF [Region Selected] THEN [State] END

When a region belongs to the selected set, the calculation returns its states. Otherwise, it returns Null.

3. Add states to the map

  1. Right-click Drill to State.
  2. Assign the geographic role Create From → Region, as used in the original workbook.
  3. Drag Drill to State onto Detail on the Marks card.

Now our map has the fields it needs to display individual states within a selected region.

What's next? We'll prepare the county-level map, then connect the views with dashboard actions so users can actually click to drill down.

Step 3: Drill Down from State to County

We've made it possible to expand regions into states. Now let's go one level deeper.

We'll create a second map for counties, then use a parameter to control which map appears.

1. Create the county map

  1. Open a new worksheet.
  2. Double-click County to generate a map.
  3. Drag your measure to Color.
  4. Rename the worksheet County-level.

‍

2. Create a state parameter

In Tableau's Data pane:

  1. Right-click State and select Create → Parameter.
  2. Name it State (For County).
  3. Add a value of US Map to the list of states.
  4. Set its Display As value to the United States.

This extra value gives us a way to return to the national map.

3. Create the map-switching calculation

Create a calculated field named County Map Pop-Up Logic:

IF [State (For County)] = [State] 
THEN "Show County-Level Map"
ELSEIF [State (For County)] = "US Map" 
THEN "Show Region/State Map"END

This calculation determines which map should be visible based on the parameter's selected value.

4. Filter the county map

On the County-level worksheet:

  1. Show the State (For County) parameter control.
  2. Select a state.
  3. Drag County Map Pop-Up Logic to Filters.
  4. Select Show County-Level Map.
Image preview

5. Filter the US map

Return to your regional map worksheet:

  1. Show the same parameter control.
  2. Select the United States.
  3. Drag County Map Pop-Up Logic to Filters.
  4. Select Show Region/State Map.
Image preview

‍

We now have two maps ready to respond to the same parameter.

Coming up: We'll arrange them on a dashboard and connect everything with actions so users can navigate by clicking the map itself.

Step 4: Format Your Maps and Build the Dashboard

Our maps are ready. Now let's make them look polished and give them a shared home.

1. Clean up the maps

On your regional map worksheet:

  1. Open Map → Map Layers.
  2. Turn off unnecessary background layers and borders.
  3. Remove worksheet shading and row or column borders.
  4. Open Map → Map Options and disable zoom and pan controls you don't want readers to use.

Repeat for the county map.

Time-saving tip: You can right-click a formatted worksheet tab, select Copy Formatting, then right-click another worksheet tab and select Paste Formatting.

For the county map, select a state in the State (For County) parameter first so the map is visible while you format it.

2. Create the dashboard

  1. Create a new dashboard.
  2. Set a fixed dashboard size or a size range appropriate for your audience.
  3. Drag a Vertical container onto the dashboard.
  4. Place your regional map worksheet inside the container.
  5. Add the County-level worksheet to the same container.

Keeping these worksheets together prepares them to switch based on the State (For County) parameter.

3. Handle Alaska and Hawaii

If you're displaying Alaska and Hawaii separately, you can position their worksheets alongside the contiguous US map.

In the original design, a blank area prevents those floating worksheets from blocking tooltips when the county map appears.

Alternatively, consider a tiled layout with containers that collapse when they're not needed.

4. Add a dynamic dashboard title

Give the dashboard a clear title and use the selected state parameter in the subtitle so readers always know which geographic level they're exploring.

Image preview

‍

Our maps are now assembled!

Coming up: We'll fix the color legend so it displays meaningful values as users switch between the regional and county views.

Step 5: Fix the Color Legend

When we switch between the regional and county maps, Tableau may display Null in the color legend.

Not exactly the polished experience we're going for!

We'll create a separate worksheet that controls the legend based on the selected geographic level.

1. Create the legend calculation

Create a calculated field named Color Legend Logic:

IF [State (For County)] = [State] THEN [County]
ELSEIF [State (For County)] = "US Map" THEN [State]
END

This calculation returns the appropriate geographic field based on the current map view.

2. Build the legend worksheet

  1. Create a new worksheet.
  2. Drag Color Legend Logic to Rows.
  3. Drag your selected measure to Color.
  4. Rename the worksheet Color Legend.

3. Add the legend to your dashboard

  1. Add the Color Legend worksheet as a floating element.
  2. Turn off Show Title.
  3. Set its position to X: -1, Y: -1.
  4. Set its size to 1 × 1 pixels.
  5. Display its color legend on the dashboard.

The worksheet stays out of sight while its legend remains visible.

The result: A cleaner dashboard with a color legend that responds to the geographic level being explored.

Next, we'll connect our maps with dashboard actions and make the drilldown interactive!

Step 6: Make the Map Clickable

We've built our maps and arranged them on a dashboard. Now let's connect everything so users can explore by clicking.

We'll use two Tableau dashboard actions to make the drilldown work.

1. Create the Region set action

On your dashboard:

  1. Select Dashboard → Actions.
  2. Click Add Action → Change Set Values.
  3. Name the action Expand Region.
  4. Under Source Sheets, select your regional map worksheets: Alaska, Contiguous US, and Hawaii.
  5. Set Run action on to Select.
  6. Choose the Region Selected set as the target.
  7. Configure the action to assign values to the set.
  8. Under Clearing the selection, choose Remove all values from set.

Click OK to save.

Now selecting a region updates the set we created in Step 2, allowing its states to appear.

2. Create the State parameter action

Still in Dashboard → Actions:

  1. Click Add Action → Change Parameter.
  2. Name the action Drill to County.
  3. Select the same three regional map worksheets as the sources.
  4. Set Run action on to Select.
  5. Choose State (For County) as the target parameter.
  6. Set the source field to Drill to State.
  7. Keep the current parameter value when the selection is cleared.

Click OK.

When a user selects a state, the parameter updates to that state. Our map-switching logic then displays its counties.

3. Test the drilldown

Return to your dashboard and try the interactions:

  1. Click a region to reveal its states.
  2. Click a state to display its counties.
  3. Confirm that the county map replaces the regional view.

‍It works! We've connected the geographic levels using Tableau's interactive actions.

But there's one thing missing: an easy way back.

Coming up: We'll create breadcrumbs so users can return to their expanded region or reset the map entirely.

Step 7: Add Breadcrumb Navigation

Our map can drill from regions to states to counties. But how do users get back?

We'll create two small worksheets that act as navigation controls:

  • Return to Region Expanded: Go from counties back to the selected region and its states.
  • Reset View: Return to the original regional map.

1. Create the Reset View worksheet

First, expand a region on your dashboard. If you're viewing counties, change the State (For County) parameter back to US Map.

Create a new worksheet:

  1. Drag Region Selected to Rows.
  2. Drag Region to Rows.
  3. Hide the Out members of the set so this control only appears after a region is selected.

Create a calculated field named US Map:

"US Map"
  1. Drag US Map to Text on the Marks card.
  2. Add State (For County) to Detail.
  3. Edit the label to say Double Click Here to Reset Map View.
  4. Rename the worksheet Reset View.

In the original design, this reset control uses two clicks. We'll preserve that behavior for now and test whether we can simplify it.

2. Create the Return to Region Expanded worksheet

We'll use a few calculations to display navigation text only when someone is viewing counties.

Create Showing Counties:

[State (For County)] <> "US Map"

Create Return to:

IIF([Showing Counties], "Return to ", "")

Create State Selected:

IIF([Showing Counties]," > " + [State (For County)], "")

Now create another worksheet:

  1. Filter Showing Counties to True.
  2. Add US Map to Rows and Text.
  3. Add Region Selected to Detail, showing only members in the set.
  4. Add Region and State Selected to the text label.
  5. Format the label to show the selected region and state.
  6. Add Return to to the tooltip.
  7. Rename the worksheet Return to Region Expanded.

This gives users a visual reminder of where they are and a way to return to the expanded region.

3. Add the breadcrumbs to your dashboard

Place both worksheets above the maps.

You can use floating elements for precise positioning or tiled containers for a more responsive layout.

Set each breadcrumb worksheet to Entire View and keep its label and tooltip formatting consistent.

Important: Check your existing dashboard actions. Tableau may automatically include newly added worksheets as action sources. Remove the breadcrumbs from any actions they shouldn't trigger.

4. Connect the navigation actions

Open Dashboard → Actions and add three actions:

Return to Region Expanded

  • Action type: Change Parameter
  • Source: Return to Region Expanded
  • Target parameter: State (For County)
  • Source field: US Map

‍Return to US Map

  • Action type: Change Parameter
  • Source: Reset View
  • Target parameter: State (For County)
  • Source field: US Map

‍Clear the selected region

  • Action type: Change Set Values
  • Source: Reset View
  • Target set: Region Selected
  • Clearing behavior: Remove all values from set

Together, these actions let users move back from counties to states, then reset the entire map.

5. Test the navigation

Try the complete journey:

  1. Select a region.
  2. Select a state to view its counties.
  3. Click the return breadcrumb to show the expanded region.
  4. Use Reset View to return to the original regional map.

Success! Our map now supports both drilldown and drillup navigation.

Coming up: We'll add meaningful comparisons so users can understand how each region, state, and county performs against its parent geographic level.

Step 8: Compare Geographic Performance

Exploring a map is useful. Understanding how one location compares to another makes it even more powerful.

We'll use Tableau's Level of Detail (LOD) expressions to calculate averages at different geographic levels.

Our comparisons will follow the drilldown:

  • Region: Compare with the national average.
  • State: Compare with its regional average.
  • County: Compare with its state average.

1. Calculate the national average

Create a calculated field named National Health Measure:

{ AVG([Health Measure Selected]) }

This gives us an overall benchmark for the country.

2. Calculate regional averages

Create Regional Health Measure:

{ FIXED [Region] : AVG([Health Measure Selected]) }

Each region now has its own benchmark.

3. Calculate state averages

Create State Health Measure:

{ FIXED [State] : AVG([Health Measure Selected]) }

Format the result as a percentage if you're working with percentage-based health statistics.

Image preview
Image preview

‍

4. Calculate county averages

Create County Health Measure:

{ FIXED [County] : AVG([Health Measure Selected]) }

This matches the original tutorial, which displays counties within one selected state at a time.

A note about your data: County names can repeat across states. For a dataset covering multiple states, consider including both State and County in the FIXED expression.

We've established our geographic benchmarks. Next, we'll calculate the differences and use them to tell a more meaningful story in our tooltips.

5. Choose the appropriate benchmark

When users expand a region, we want to compare its states with the regional average. Otherwise, we'll compare regions with the national average.

Create Regional or National Health Measure:

IIF([Region Selected], [Regional Health Measure], [National Health Measure])

‍

6. Calculate the differences

Create Regional Difference from National:

ROUND([Regional Health Measure], 2) - ROUND([National Health Measure], 2)

Create State Difference from Regional:

ROUND([State Health Measure], 2) - ROUND([Regional Health Measure], 2)

Create County Difference from State:

ROUND([County Health Measure], 2) - ROUND([State Health Measure], 2)

These calculations show how far each geographic level differs from its parent.

7. Make the comparison dynamic

Create Regional or National Health Measure Difference:

IIF([Region Selected], [State Difference from Regional], [Regional Difference from National])

Now the comparison changes automatically as users expand regions.

8. Add visual indicators

Want to make those differences easier to scan?

In Tableau, right-click a difference calculation and select Default Properties → Number Format → Custom.

For the percentage-based health measures in this example, use:

0% ▲;0% ▼;Same as
Image preview

‍

The three sections control how positive, negative, and zero values appear.

A formatting tip: The arrows are just characters in a custom number format. You can replace them with other symbols or use a simpler positive/negative display.

9. Create a dynamic comparison label

Create a calculated field named "regional" or "national":

IIF([Region Selected], "regional", "national")

This gives our tooltips the correct comparison language automatically.

We've now built the calculations needed to compare regions, states, and counties with meaningful benchmarks.

Coming up: We'll turn these numbers into clear, interactive tooltips that guide users through the map.

‍

Step 9: Have Your Tooltips Tell a Story!

Our map is interactive, our comparisons are calculated, and our navigation is ready. Let's bring everything together with tooltips that do more than display numbers.

We'll add three things:

  • Context: Which region, state, or county are we exploring?
  • Comparison: How does it perform against its parent geography?
  • Guidance: What can users click next?

1. Create a dynamic navigation message

Create a calculated field named Click to view:

IF [Region Selected] = TRUE THEN "Click to view Counties in " + [State]
ELSE "Click to view States in the " + [Region] 
END

This message changes depending on whether the user is viewing regions or expanded states.

2. Build the regional map tooltips

On each regional worksheet, including the contiguous US, Alaska, and Hawaii, add these fields to Tooltip on the Marks card:

  • Click to view
  • "regional" or "national"
  • Regional or National Health Measure Difference
  • Regional or National Health Measure

Then open Edit Tooltip and arrange the fields to show:

Region or State Name

Click to view States in the Region (or Counties in the State)

Selected Health Measure: Current value

Comparison: Difference from the regional or national average

Use Tableau's Insert menu to add the actual field values. This ensures the tooltips respond dynamically to the selected geography.

<Region> Region

<ATTR("Click to view")>

<AVG(Health Measure Selected)> <Parameters.Health Measure> (<AVG(Regional or National Health Measure Difference)> <ATTR("regional" or "national")> average of <AVG(Regional or National Health Measure)>.)

Tip: Tooltip fields can sometimes be finicky. If you are swapping out fields from the Marks box and the tooltips are not properly displaying, try opening and closing the tooltip or re-insert them from the Insert dropdown.

3. Build the county map tooltip

On the County-level worksheet, add these fields to Tooltip:

  • County Difference from State
  • State Health Measure

Format the tooltip to display:

State Name

County Name

Selected Health Measure: Current county value

Comparison: Difference from the state average

Include the state average so users can see both the benchmark and the difference.

<State>
<County> County

<AVG(Health Measure Selected)> <Parameters.Health Measure> (<AVG(County Difference from State)> state average of <AVG(State Health Measure)>.)

‍

4. Polish the presentation

A few finishing touches make a big difference:

  1. Use bold text to establish a clear visual hierarchy.
  2. Apply consistent number formatting.
  3. Use color sparingly to emphasize meaningful comparisons.
  4. Remove unnecessary tooltip commands if you don't want users accidentally filtering the view.
  5. Test the tooltips at every geographic level.

5. Test the complete experience

Before sharing your dashboard, follow the full journey:

  1. Hover over a region to see its national comparison.
  2. Click the region to reveal its states.
  3. Hover over a state to see its regional comparison.
  4. Click the state to explore its counties.
  5. Hover over a county to see its state comparison.
  6. Use the breadcrumbs to navigate back to the regional view.

And there you have it!

You've created an interactive Tableau map that encourages exploration, provides meaningful geographic comparisons, and gives users a clear path through the data.

Happy vizzing! 💗

‍

Say hello!

Have a question or just want to say hi?
I'd love to hear from you.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
×
This is some text inside of a div block.