Tableau Course
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.
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.
Context Filter — Filters Shelf Mockup
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:
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.
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.