How to Link Two Filters in Tableau
Building an interactive dashboard in Tableau is one thing, but building one that feels intuitive is another. When a user selects a value in a filter, they expect other filters to react accordingly, narrowing down the options intelligently. This article will show you exactly how to link two or more filters in Tableau to create a seamless, guided analytics experience for your users.
Why Should You Link Filters in Tableau?
Linking filters, often called "cascading" or "dependent" filters, is a fundamental technique for improving the user experience of any dashboard. The core benefit is simple: it prevents users from getting lost in irrelevant options.
Imagine a dashboard with two dropdown filters: one for Continent and one for Country. If a user selects "Europe" in the Continent filter, does it make sense for the Country filter to still show them options like "Brazil," "Japan," and "Canada"? Of course not. A properly linked filter would automatically update the Country list to show only European nations like Germany, France, and Italy.
This approach delivers a few key advantages:
- Reduced Clutter: It simplifies the user interface by only showing relevant choices, making it easier to navigate.
- Faster Analysis: Users can find the specific data they need more quickly without having to hunt through long, unfiltered lists.
- Guided Experience: It creates a logical flow, guiding the user from broad categories to more specific details, making the data exploration process more intuitive.
The Core Concept: "Only Relevant Values"
Tableau makes this powerful functionality surprisingly simple to implement with a built-in feature called "Only Relevant Values." This is the primary mechanism you will use to create dependent filters.
Here’s how it works conceptually:
- By default, when you add a filter to a worksheet, Tableau sets it to show "All Values in Database." This means the filter list contains every possible value for that field from your entire data source, regardless of what other filters are selected.
- When you switch a filter's setting to "Only Relevant Values," you're instructing Tableau to look at the other active filters on the worksheet first. It will then dynamically update the list of options in your current filter to show only the values that exist after the other filters have been applied.
For example, if the Region filter is set to "West," a State filter set to "Only Relevant Values" will only display states from the West region (California, Oregon, Washington, etc.), because those are the only relevant values left in the data after the Region filter has been applied.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Step-by-Step Guide: Creating Your First Linked Filters
Let's walk through building a simple visualization with linked filters using the "Sample - Superstore" dataset that comes with Tableau. Our goal is to create a primary filter for Category and a secondary, dependent filter for Sub-Category.
Step 1: Set Up Your Worksheet
First, we need a basic view to work with. A simple text table is perfect for seeing how the filtering affects the data.
- Connect to the Sample - Superstore data source.
- Drag the Category dimension to the Rows shelf.
- Drag the Sub-Category dimension to the Rows shelf, to the right of Category.
- Drag the Sales measure to the Text mark on the Marks card.
You should now see a simple table listing all Categories and their corresponding Sub-Categories with their total sales.
Step 2: Add the Primary Filter (Category)
Now, let's create the first, or primary, filter. This is the filter that will control the options available in our second filter.
- In the Data pane on the left, find the Category dimension.
- Right-click on Category and select Show Filter.
You will see a filter card for Category appear on the right side of your view, with checkboxes for "Furniture," "Office Supplies," and "Technology."
Step 3: Add the Secondary Filter (Sub-Category)
Next, we add the second filter that we want to become dependent on the first one.
- In the Data pane, find the Sub-Category dimension.
- Right-click on Sub-Category and select Show Filter.
A second filter card for Sub-Category will appear. At this point, the filters are independent. If you uncheck "Furniture" in the Category filter, the Sub-Category filter will still show all 17 sub-categories, including those from Furniture (like "Bookcases" and "Chairs"). This is what we want to fix.
Step 4: Configure the "Only Relevant Values" Link
This is the essential step where we connect the two filters. We will configure the Sub-Category filter to listen to the selection made in the Category filter.
- On the Sub-Category filter card, click the small dropdown arrow in the top-right corner to open its options menu.
- In the menu, select Only Relevant Values.
That's it! Now, test your work. Go to the Category filter and select only "Furniture." You'll immediately see the Sub-Category filter update to show only the four relevant options: Bookcases, Chairs, Furnishings, and Tables. If you then check "Technology" instead, the list changes again to show Accessories, Copiers, Machines, and Phones. Your filters are now linked!
Advanced Techniques and Best Practices
Linking two filters is a great start, but in real-world dashboards, you'll often need to manage more complex scenarios.
Creating Multi-Level Cascading Filters
What if you need a three-level hierarchy, like Region -> State -> City? The logic is exactly the same, you just apply it sequentially.
- Add filters for Region, State, and City.
- Set the State filter to Only Relevant Values. This links it to the Region filter.
- Set the City filter to Only Relevant Values. This links it to whatever is selected in both the Region and State filters.
This creates a chain reaction. Selecting a region updates the state list, and selecting a state updates the city list, guiding the user smoothly through the data hierarchy.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Improving Performance with Context Filters
If your primary filter significantly reduces the amount of data (e.g., filtering on a single year in a ten-year dataset), performance can sometimes slow down as Tableau calculates the relevant values for the dependent filters. To optimize this, you can turn your primary filter into a Context Filter.
A context filter acts as an independent, pre-filter. Tableau will apply it to the data source first, creating a smaller, temporary table. All other filters, including your linked "relevant values" filters, will then run against this much smaller dataset, speeding up dashboard performance.
To create one, simply click the dropdown on your primary filter card (e.g., Year) and select Add to Context. The filter tile will turn grey, indicating it's now a context filter.
Best Practices for User Experience
- Logical Order: Always arrange your dependent filters on the dashboard in a logical top-to-bottom or left-to-right order (e.g., Category, then Sub-Category). This visual hierarchy reinforces the filtering logic.
- Use Single-Value Dropdowns: For a cleaner look and a clearer filtering path, consider changing your filters from multi-select lists to single-value dropdowns. You can do this by clicking the filter menu arrow and choosing the "Single Value (dropdown)" option.
- Clear Instructions: For complex dashboards, it can be helpful to add a simple text box with instructions like "Start by selecting a Region to see available States."
Final Thoughts
Linking filters using the "Only Relevant Values" option is a fundamental skill that transforms a static report into a truly dynamic and user-friendly dashboard. It's an easy-to-implement feature that dramatically improves how end-users explore and understand their data, guiding them toward insights without overwhelming them with unnecessary choices.
While mastering techniques like these in tools such as Tableau is rewarding, it often involves a significant learning curve. We built Graphed because we believe achieving interactivity shouldn't require navigating complex menus and options. You can connect your marketing and sales data sources, then use plain English to describe the dashboard you need. Graphed builds it in seconds, turning hours of manual setup into a simple conversation focused on getting you the insights you need.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.