Tableau Lesson 31 – Filters | Dataplexa
Section IV — Lesson 31

Filters in Depth

Tableau applies filters in a strict execution order — and understanding that order is the difference between a filter that works and one that silently produces the wrong result. This lesson covers the full filter pipeline, context filters, and how to apply filters across multiple worksheets.

The Filter Execution Order

Every filter in a Tableau workbook runs in a fixed sequence. A filter lower in the order never sees rows that were removed by a filter higher in the order. This sequence is not optional or configurable — it is how Tableau's query engine works, and understanding it explains why certain filter combinations produce unexpected results.

1
Extract Filters
Applied when the extract (.hyper file) is created — excluded rows are never stored
2
Data Source Filters
Applied before any data enters the workbook — all worksheets see the filtered dataset
3
Context Filters
Create a filtered subset — all subsequent filters run against this subset, not the full dataset
4
Dimension Filters
Filter on Dimension values — Category, Region, Sub-Category — in a worksheet
5
Measure Filters
Filter on aggregated Measure values — SUM(Sales) > $10,000
6
Table Calculation Filters
Applied after all aggregation — hides marks without removing underlying data from calculations

Dimension Filters — General, Wildcard, Condition, Top

Dragging a Dimension to the Filters shelf opens a four-tab dialog. Each tab offers a different filtering method — and knowing which tab to use saves significant time.

Tab Use for Example
General Selecting specific values from a list — include or exclude individual members Include only East and West Regions
Wildcard Matching on partial text — contains, starts with, ends with, exactly matches Sub-Category contains "Chair"
Condition Keeping Dimension members where a Measure meets a condition Keep only Sub-Categories where SUM(Profit) > 0
Top Keeping only the top or bottom N members by a Measure Top 5 Sub-Categories by SUM(Sales)

Context Filters — Fixing the Top N Problem

Context filters solve a specific but very common problem: a Top N filter that ignores another filter you have applied. Here is the scenario: you filter to show only the Technology Category, then add a Top 5 Sub-Category filter by Sales. You expect to see the top 5 Technology Sub-Categories. Instead, Tableau shows the top 5 Sub-Categories across the entire dataset — because the Top filter runs against the full data, not the Category-filtered subset.

The fix is to promote the Category filter to a context filter. A context filter runs first — it creates a restricted dataset that all other filters then run against. The Top 5 filter now correctly finds the top 5 within the Technology-only context.

1
Add Category to the Filters shelf and select Technology only. Then add Sub-Category to the Filters shelf → Top tab → Top 5 by SUM(Sales). Observe that the result may not be what you expect — Tableau is computing the Top 5 from the full dataset.
2
Right-click the Category filter pill on the Filters shelf and select Add to Context. The pill turns grey — indicating it is now a context filter. A grey context filter indicator appears above the other filters in the shelf.
3
The Top 5 Sub-Category filter now correctly returns the top 5 Technology sub-categories — because it is running against the Technology-only context, not the full dataset. The Category filter being grey on the shelf is the visual confirmation that the context is active.

Context Filter — Filters Shelf Mockup

Filters Shelf — Context filter active
Context
Category Technology ✓
Filters
Sub-Category Top 5 by Sales
Grey pill = context filter · Blue pill = standard filter

Measure Filters — Range, At Least, At Most, Special

Dragging a Measure to the Filters shelf opens a different dialog asking how to aggregate the Measure first — SUM, AVG, COUNT, MIN, MAX, and so on. After choosing an aggregation, the filter dialog offers four modes: Range of values (between a min and max), At least (greater than or equal to), At most (less than or equal to), and Special (Non-null values only, or Null values only). Measure filters run after Dimension filters in the execution order — they filter on the aggregated result, not on individual row values.

Applying Filters Across Multiple Worksheets

By default, a filter on the Filters shelf applies only to the current worksheet. To apply it to other sheets, right-click the filter pill → Apply to Worksheets and choose from three options:

All Using This Data Source
Applies the filter to every worksheet connected to the same data source in the workbook. The most common choice for dashboard-wide filters.
All Using Related Data Sources
Applies the filter across multiple data sources that share the same field — useful in blended or multi-source dashboards.
Selected Worksheets
Opens a dialog listing all worksheets — check the specific sheets the filter should apply to. The most precise option when only some sheets share the filter's context.

Table Calculation Filters — The Special Case

Table Calculation filters behave differently from all other filter types. They run last in the execution order — after all aggregation has already happened. This means they hide marks from the view without removing the underlying data from the calculation. If you use a Percent of Total table calculation and then add a table calculation filter to show only the top 3, the Percent of Total will still compute against all marks — including the hidden ones. The displayed percentages will not sum to 100%. This is correct behaviour, but it surprises many analysts who expect filtering to change the percentages.

📌 Teacher's Note

The context filter is the most important filter concept to understand in Tableau — and the most commonly misunderstood. The symptom of a missing context filter is always the same: a Top N filter that returns the wrong items because it is computing against the full dataset instead of the filtered subset. Every time you combine a category filter with a Top N filter on the Filters shelf, ask yourself: is the Top N computing within the category I selected, or across all data? Right-click the category filter pill and look for the grey colour. Grey means context is active and the Top N is correct. Blue means no context and the Top N may be wrong. The table calculation filter is the other special case worth memorising — it is the only filter that runs after aggregation, which is why filtered Percent of Total figures do not add up to 100%. If your percentages do not sum correctly after filtering, a table calculation filter somewhere in the view is almost always the cause.

Practice Questions

1. A Top 5 Sub-Category filter is returning results from the full dataset instead of the Technology-only filtered subset. How do you fix this?

2. A Region filter on one worksheet needs to apply to every sheet in the workbook that uses the same data source. How do you configure this?

3. A Percent of Total table calculation is filtered to show only 3 Sub-Categories. The three displayed percentages do not add up to 100%. What causes this?

Quiz

1. In the Tableau filter execution order, which filter type runs between Data Source Filters and Dimension Filters?


2. You want to filter the Sub-Category Dimension to show only sub-categories where total Profit is greater than zero. Which tab of the Dimension filter dialog handles this?


3. After right-clicking a filter and selecting Add to Context, what visual change on the Filters shelf confirms the context filter is active?


Next up — Lesson 32: Quick filters — adding interactive filter controls to worksheets and dashboards so viewers can explore the data themselves.