Chapter 5 of 12

Filters in Tableau

Master every filter type in Tableau — from dimension and measure filters to context filters, Top N, and dashboard filter actions — and understand how filter order of operations affects your analysis.

Meritshot19 min read
TableauFiltersData FilteringContext Filters
All Tableau Chapters

Filters in Tableau

Filtering is one of the most fundamental operations in any analytics tool. In Tableau, filters are not just a mechanism for hiding rows — they are a layered system that executes in a precise sequence, each layer building on the last. Understanding how Tableau processes filters is the single most important concept for building accurate, performant dashboards.

This chapter walks you through every filter type available in Tableau, explains the order of operations that governs them, and shows you how to use them effectively in both worksheets and dashboards.


The Filter Order of Operations

Tableau applies filters in a fixed sequence. This sequence determines what data is visible at each stage and, critically, which filters can see results from other filters. When you add multiple filters to a view, they are not applied simultaneously — each one reduces the dataset before the next filter runs.

Here is the complete order:

StepFilter TypeWhere It RunsNotes
1Extract FiltersOn extract creationPermanently limits rows in the extract
2Data Source FiltersBefore any worksheetApplies to all sheets using that connection
3Context FiltersPer worksheetCreates a temporary table; other filters run against it
4Top N / Condition FiltersPer worksheetRuns against the context, if one exists
5Dimension FiltersPer worksheetFilters categorical fields
6Measure FiltersPer worksheetFilters aggregated values
7Table Calculation FiltersPer worksheetFilters results after aggregation

Why Order Matters: A Concrete Example

Imagine you have a dataset of global sales. You want to see the Top 10 products by revenue, but only within the United States.

Scenario A — No Context Filter: You add a Region dimension filter for "United States" and a Top 10 filter by Sales. Because Top N filters (Step 4) run before Dimension filters (Step 5) in certain configurations, Tableau may compute the Top 10 globally first, and then filter to the United States — giving you whichever of those 10 global leaders happened to have US sales, not the actual Top 10 within the US.

Scenario B — With a Context Filter: You promote the Region = "United States" filter to a Context Filter (Step 3). Now Tableau first restricts the dataset to US rows only, creates a temporary result set, and then calculates the Top 10 from that restricted set. You now see the correct Top 10 products within the United States.

This distinction is critical whenever you combine Top N or Condition filters with dimension restrictions.

Practical Implications of Each Stage

Extract Filters are set once when you create or refresh a Tableau extract. They reduce the rows stored in the .hyper file permanently. Use them to exclude historical data you never need (e.g., orders before 2018) or to remove confidential fields. They cannot be changed at view time without re-extracting.

Data Source Filters apply to every single worksheet connected to that data source within the workbook. They are ideal for role-based data restrictions (e.g., a regional manager should only see their region's data across all tabs). They add a small query overhead because they wrap every query sent to the database.

Context Filters create a temporary table or subquery that subsequent filters operate against. Their primary value is making Top N and Condition filters accurate within a filtered subset.

Dimension Filters are the most commonly used filters. They appear as interactive filter cards on worksheets and dashboards.

Measure Filters operate on aggregated values (e.g., SUM(Sales) > 10000) and run after the aggregation step.

Table Calculation Filters use the results of table calculations. Because table calculations run entirely in Tableau's engine (not the database), these filters can drastically reduce performance on large datasets.


Dimension Filters

A dimension filter restricts which members of a categorical field are included in the view. To add one, drag a dimension to the Filters shelf, or right-click a field in the view and choose Filter.

Filter Dialog Tabs

When you open the filter dialog for a dimension, you see four tabs:

General Tab This is the most common way to filter. You can:

  • Select from list — check or uncheck specific members. Tableau shows you all distinct values and their counts.
  • Use All / None / Exclude — include everything, nothing, or invert your selection.
  • Search — useful when a dimension has hundreds of members.

Wildcard Tab Lets you match members using pattern rules:

  • Contains — member includes the string
  • Starts with — member begins with the string
  • Ends with — member ends with the string
  • Exactly matches — exact string equality

Example: Filter [Product Name] where it contains "Pro" to show only products with "Pro" in their name.

Condition Tab Lets you filter based on a formula or a summary function:

  • By field — e.g., only show [Customer Name] where SUM([Sales]) > 5000
  • By formula — write a custom boolean expression, e.g., CONTAINS([Product Name], "Chair") AND SUM([Profit]) > 0

Top Tab Lets you show only the top or bottom N members based on a measure. This is covered in detail in the Top N Filters section below.

Keeping vs. Excluding Members

After you create a dimension filter, right-click the field on the Filters shelf:

  • Edit Filter — reopen the dialog
  • Show Filter — display an interactive filter card on the view
  • Remove — delete the filter

In the General tab, note the "Exclude" checkbox at the bottom. When checked, your selected members are excluded instead of included. This is useful when you want "everything except returns" or "all regions except Returns & Cancellations."


Measure Filters

Measure filters operate on aggregated numeric values. To add one, drag a measure to the Filters shelf. Tableau immediately asks you to choose an aggregation (Sum, Average, Minimum, etc.) because you are filtering on a computed value, not a raw row value.

Measure Filter Modes

ModeUse Case
Range of ValuesFilter between a minimum and maximum (e.g., Sales between 1000 and 50000)
At LeastOnly include values above a threshold (e.g., Profit >= 0)
At MostOnly include values below a threshold (e.g., Discount <= 0.3)
SpecialHandle null values: show only nulls, only non-nulls, or all values

Null Handling with the Special Tab

The Special tab is often overlooked. When a measure contains null values, those rows are included or excluded based on this setting:

  • All values — nulls are included (default)
  • Non-null values — nulls are excluded from the view
  • Null values — only null rows are shown (great for data quality audits)

Date Filters

Dates in Tableau have their own dedicated filter dialog with multiple modes:

Relative Dates

Show data for a rolling time window relative to today:

  • Last N days, weeks, months, quarters, years
  • This week, this month, this quarter, this year
  • Today, yesterday

Use relative date filters on live connections to dashboards that always need to show "last 30 days" without manual updating.

Range of Dates

Specify a fixed start date and end date. Ideal for static reports covering a known fiscal period.

Starting Date / Ending Date

Open-ended ranges:

  • Starting date — all dates on or after a specified date
  • Ending date — all dates on or before a specified date

Special (Null Handling)

Same as measure filters — include all, only non-null, or only null date values.

Date Part vs. Date Value

When you drop a date on the Filters shelf, Tableau asks whether you want to filter by:

  • Date Part — filter on a recurring component like Month (January, February...) or Year (2022, 2023...)
  • Date Value — filter on specific calendar dates (continuous)
  • Date & Time — includes the time component for datetime fields

Filter Cards (Quick Filters)

When you right-click a filter on the Filters shelf and choose "Show Filter," a filter card appears on the right side of the worksheet (or on the dashboard). End users can interact with this card to change what they see without editing the workbook.

Filter Card Display Types

Card TypeBest For
Single Value (List)Small number of mutually exclusive options
Single Value (Dropdown)Small number of options, saves space
Single Value (Slider)Ranges or ordered sequences
Multiple Values (List)Allowing users to select several members
Multiple Values (Dropdown)Many members, compact space
Multiple Values (Custom List)Users type or paste values
Wildcard MatchText search filtering
Relative DateRolling time windows

To change the card type, click the small dropdown arrow at the top-right of any filter card and choose a display type.

Relevance Options

Also in that dropdown:

  • Only Relevant Values — each filter card updates based on the current selections in other filter cards. If the user picks "West" for Region, only West's product categories appear in the Category filter. This is helpful for guided exploration but can slow performance.
  • All Values in Database — always shows the full list regardless of other filters. This is the most performant option.
  • All Values in Context — shows only values that exist after Context Filters are applied.

Hiding the "All" Option

By default, filter cards include an "All" option that removes the filter entirely. To disable this:

  1. Click the filter card dropdown arrow
  2. Uncheck "Include All Value" (for single-select cards) or uncheck "Show All" (for list cards)

This is important on dashboards where you always want at least one value selected, preventing accidental display of the entire unfiltered dataset.


Context Filters

A Context Filter is a special designation applied to an existing dimension filter. When you mark a filter as a context filter, Tableau:

  1. Evaluates that filter first
  2. Physically creates a temporary table (or subquery, for live connections) containing only the rows that pass the filter
  3. Runs all other filters, Top N, Condition filters, and aggregations against that temporary subset

When to Use Context Filters

You need a context filter whenever:

  • You have a Top N filter that should operate within a specific segment
  • You have a Condition filter that should only consider data from a specific subset
  • Performance is suffering because a complex filter is not being pushed down to the database efficiently

How to Create a Context Filter

  1. Add the dimension filter you want to use as the context (e.g., drag [Region] to the Filters shelf and select "West")
  2. Right-click that filter on the Filters shelf
  3. Choose Add to Context

The filter pill turns gray to indicate it is now a context filter.

To remove context status, right-click and choose Remove from Context.

Context Filter Example: Top 10 Products in the West Region

Step 1: Drag [Region] to Filters, select "West," click OK.

Step 2: Right-click [Region] on the Filters shelf → Add to Context. The pill turns gray.

Step 3: Drag [Product Name] to Filters → Top tab → Top 10 by SUM([Sales]).

Step 4: The view now shows exactly the 10 products with the highest sales within the West region, not the top 10 globally filtered to West.


Condition Filters

Condition filters are found on the Condition tab of the dimension filter dialog. They let you include or exclude dimension members based on:

By Field

Choose a measure and an aggregation, then set a comparison:

  • Include [Sub-Category] where SUM([Profit]) is greater than 0
  • Include [Customer Name] where COUNT([Order ID]) is at least 5

By Formula

Write a boolean calculation that references aggregates:

SUM([Sales]) / SUM([Profit]) > 3

Include only those dimension members where the sales-to-profit ratio exceeds 3.

Formula-based conditions give you the full power of Tableau's calculation language for filtering.


Top N Filters

The Top tab in the dimension filter dialog lets you limit results to the highest or lowest N members by a measure.

Configuration Options

SettingOptions
ShowTop or Bottom
NA fixed number or a field/parameter
ByAny measure with any aggregation

Dynamic Top N with Parameters

Instead of a fixed number, you can set N to a Tableau Parameter. This lets end users choose how many items they want to see:

  1. Create a parameter: Data menu → Create Parameter → Integer type → range 1 to 50
  2. Open the dimension filter dialog → Top tab
  3. In the N field, click the dropdown and choose your parameter
  4. Right-click the parameter → Show Parameter Control

Now users can drag a slider to see Top 5, Top 10, Top 20, etc. dynamically.


Applying Filters to Multiple Worksheets

By default, a filter you create on a worksheet applies only to that worksheet. To apply it more broadly:

Apply to Worksheets Options

Right-click any filter on the Filters shelf:

  • Only This Worksheet — default behavior
  • All Using This Data Source — applies the filter to every sheet in the workbook connected to the same data source
  • All Using Related Data Sources — applies across related data sources (using data blending relationships)
  • Selected Worksheets — lets you pick specific sheets from a list

This is extremely useful for dashboards. For example, you might have a date filter on Sheet 1 that you want to apply to Sheet 2, Sheet 3, and Sheet 4 simultaneously.


Dashboard Filter Actions

Filter Actions are the primary mechanism for creating interactivity between views on a dashboard. When a user clicks (or hovers over) a mark in one sheet, it filters another sheet.

How to Create a Filter Action

  1. On a dashboard, go to Dashboard menu → Actions
  2. Click Add Action → Filter
  3. Configure:
    • Source Sheets — which sheet triggers the action
    • Run action on — Hover, Select, or Menu (right-click)
    • Target Sheets — which sheet(s) get filtered
    • Clearing the Selection — Show all values / Leave the filter / Exclude all values

Clearing Behavior Explained

Clearing OptionBehavior When User Deselects
Show all valuesThe target sheet shows all data again
Leave the filterTarget stays filtered on the last selection
Exclude all valuesTarget shows nothing when nothing is selected

"Show all values" is the most common and intuitive choice for exploratory dashboards.

Multiple Target Sheets

A single filter action can target multiple sheets simultaneously. This lets a single click on a map update a bar chart, a line chart, and a KPI card all at once.


Data Source Filters vs. Worksheet Filters

Both accomplish filtering, but they serve different purposes:

AspectData Source FilterWorksheet Filter
ScopeAll worksheets using that connectionOnly the current worksheet (by default)
TimingApplied before any worksheet queryApplied per-worksheet query
VisibilityNot shown as an interactive cardCan be shown as an interactive filter card
SecuritySuitable for restricting sensitive data across the whole workbookNot suitable for security — users can edit worksheet filters
PerformanceCan improve performance by reducing data earlyCan hurt performance if not index-friendly

Use Data Source Filters when:

  • You need a consistent data restriction across all views (e.g., exclude test orders)
  • You are distributing a workbook to users who should never see certain rows
  • You want to improve performance by reducing data volume before any queries run

Use Worksheet Filters when:

  • The filter is specific to one view's analysis
  • You want users to be able to interact with the filter

Parameter-Driven Filters (Introduction to Parameters)

Parameters are dynamic values in Tableau that users can change at runtime. When combined with filters, they make your dashboards highly interactive without requiring separate filter cards for every option.

Common Parameter + Filter Patterns

Dynamic Date Range: Create two parameters (Start Date, End Date) and use a calculated field:

[Order Date] >= [Start Date Parameter] AND [Order Date] <= [End Date Parameter]

Drag that calculated field to the Filters shelf and set it to True.

Dynamic Measure Selection: Create a string parameter with values like "Sales," "Profit," "Quantity" and use it to drive which measure is displayed via a CASE statement in a calculated field.

Top N Control: As described in the Top N section, connect a parameter to the Top filter dialog.

Parameters are covered in depth in a later chapter, but understanding their interaction with filters is essential for building truly dynamic dashboards.


Performance Implications of Different Filter Types

Not all filters are equal in terms of query performance:

Filter TypePerformance ImpactReason
Extract FilterBest (zero runtime cost)Applied once at extract time
Data Source FilterVery goodFilters data before worksheet queries
Context FilterModerateCreates a temp table; other filters benefit
Dimension Filter on indexed columnGoodDatabase index can accelerate it
Dimension Filter on non-indexed columnPoorFull table scan required
Measure FilterPoorRequires aggregation before filtering
Table Calculation FilterWorstRuns in Tableau engine, all data must transfer

Optimization Tips

  1. Push filters to the database — use Data Source Filters or Extract Filters whenever the restriction is global.
  2. Avoid Table Calculation Filters — instead, use a calculated field at the row level and put that on the Filters shelf as a dimension filter.
  3. Index filter columns — work with your database administrator to ensure columns used in frequently-applied filters have database indexes.
  4. Use Context Filters sparingly — they create temporary tables; too many can slow down initial load time.
  5. Only Relevant Values adds overhead — use "All Values in Database" for filter cards when possible.

Practice Exercises

Exercise 1: Multi-Level Filtering

Dataset: Sample - Superstore

Task:

  1. Build a view showing Sales by Sub-Category.
  2. Add a Category dimension filter and show it as a Multiple Values (List) filter card.
  3. Add a Profit measure filter to show only Sub-Categories with SUM(Profit) > $0.
  4. Observe: does changing the Category filter change which sub-categories pass the Profit filter?
  5. Now promote the Category filter to a Context Filter. Re-check the behavior.

Goal: Understand how Context Filters affect Measure Filter results.

Expected Outcome: With the context filter in place, the Profit filter evaluates only within the selected categories, potentially showing different sub-categories than without it.


Exercise 2: Top N with Dynamic Parameter

Dataset: Sample - Superstore

Task:

  1. Create an Integer parameter called "Top N Products" with a range from 1 to 20, step 1, default 10.
  2. Build a horizontal bar chart of Sales by Product Name, sorted descending.
  3. Add a Top N filter on Product Name: Top [Top N Products] by SUM(Sales).
  4. Show the parameter control.
  5. Add a Region filter as a Context Filter.
  6. Verify that changing Region changes which products appear in the top N.

Goal: Build a dynamic, context-aware Top N view.


Exercise 3: Dashboard Filter Action

Dataset: Sample - Superstore

Task:

  1. Create Sheet 1: a map of Sales by State (filled map).
  2. Create Sheet 2: a bar chart of Sales by Category.
  3. Create Sheet 3: a line chart of Sales by Order Date (Month).
  4. Place all three sheets on a single dashboard.
  5. Create a Filter Action: clicking a state on the map filters both the bar chart and the line chart.
  6. Set Clearing the Selection to "Show all values."
  7. Test: click California, verify the other two sheets update. Click away to deselect, verify everything resets.

Goal: Build an interactive geographic drill-down dashboard.


Summary

In this chapter you learned:

  • Filter Order of Operations — Tableau applies 7 filter types in a fixed sequence: Extract → Data Source → Context → Top N/Condition → Dimension → Measure → Table Calculation. This sequence determines which data each filter sees.

  • Dimension Filters — restrict categorical members via list selection, wildcard matching, formula-based conditions, or Top N rules.

  • Measure Filters — restrict aggregated numeric values using range, threshold, or null-handling modes.

  • Date Filters — offer relative, range, starting, and ending modes to control time-based analysis.

  • Filter Cards — display interactive controls to end users; configured with display type (list, slider, dropdown, wildcard) and relevance options.

  • Context Filters — create a temporary data subset that downstream Top N and Condition filters operate against, solving the classic "Top N within a group" problem.

  • Condition & Top N Filters — enable formula-based inclusion/exclusion and rank-based truncation of dimension members.

  • Dashboard Filter Actions — connect views so that user interactions in one sheet filter other sheets, enabling guided analytical exploration.

  • Data Source Filters vs. Worksheet Filters — choose based on scope (workbook-wide vs. sheet-specific), security needs, and performance goals.

  • Parameter-Driven Filters — use parameters to let users dynamically control filter values at runtime.

  • Performance — order filters wisely, push restrictions to the database early, avoid Table Calculation Filters when possible, and use context filters judiciously.

Mastering Tableau's filter system gives you precise control over what data your audience sees, how calculations are scoped, and how different parts of a dashboard interact with each other.