3.5 Filters, Order of Operations, Groups, Bins & Sets
Key Takeaways
- Context Filters execute before Top N, Dimension Filters, and FIXED LODs in Tableau's Order of Operations, turning the filter pill grey.
- Table Calculation Filters evaluate at the very end of the pipeline, hiding visual marks without excluding those underlying records from calculation values.
- Bins discretize continuous numerical measures into equal-sized buckets, whereas Groups combine discrete dimension members into custom categories.
- Dynamic Sets automatically update membership based on rules, Top N criteria, or conditions, producing a Boolean IN/OUT field in the Data Pane.
3.5 Filters, Order of Operations, Groups, Bins & Sets
Filtering, grouping, binning, and defining sets are fundamental methods for segmenting data in Tableau Desktop. Mastering Tableau's Order of Operations (also known as the Operations Pipeline) is one of the highest-yield topics on the Tableau Desktop Specialist exam, as it governs how filters interact with calculations and level-of-detail operations.
Tableau Order of Operations (The Pipeline)
Tableau executes operations in a strict hierarchical order. If filters do not produce expected results, it is almost always due to an Order of Operations misunderstanding.
1. Extract Filters
2. Data Source Filters
3. Context Filters (Grey Pill)
4. Sets, Top N Filters, FIXED LOD Expressions
5. Dimension Filters (Blue/Green Pills on Filters Shelf)
6. INCLUDE / EXCLUDE LOD Expressions, Measure Filters
7. Table Calculation Filters (e.g., LOOKUP)
Detailed Breakdown of Filter Types
- Extract Filters: Created when connecting to or creating a Tableau Extract (
.hyper). Restricts data pulled into the extract, reducing file size and improving performance. - Data Source Filters: Applied globally at the data source level (
Data -> Edit Data Source Filters). Restricts data across all worksheets using that data source. - Context Filters: Created by right-clicking a dimension filter on the Filters shelf and selecting Add to Context.
- Visual Cue: Turns the filter pill Grey on the Filters shelf.
- Function: Creates a temporary independent context table. All downstream filters (Top N, FIXED LODs, Dimension filters) evaluate only within the data subset allowed by the Context filter.
- Exam Scenario: To view the "Top 10 Products in the East Region",
[Region] = 'East'MUST be added to Context. Otherwise, Tableau calculates the overall Top 10 products first (Step 4) and then filters for East (Step 5), resulting in fewer than 10 products displayed!
- Dimension Filters: Filters discrete or continuous dimensions (Step 5).
- Measure Filters: Filters aggregated measure ranges (e.g.,
SUM(Sales) >= 5000) after rows are grouped (Step 6). - Table Calculation Filters: Filters created using table calculation functions (e.g.,
LOOKUP(MIN([Category]), 0)). Evaluates at the very end of the pipeline (Step 7).- Key Feature: Hides marks from the visual view without removing underlying data from prior table calculation computations!
Groups, Bins, and Sets
Tableau provides three distinct tools to organize and segment data items in the Data Pane.
1. Groups (Categorical Custom Combination)
Groups combine discrete dimension members into higher-level custom categories.
- Data Type: Created from Discrete Dimensions.
- Icon: Indicated by a Paperclip icon (📎) in the Data Pane.
- Use Case: Combining spelling variations (e.g., grouping "NY", "N.Y.", and "New York" into "New York State") or combining sub-categories into custom sales territories.
- Static Nature: Groups are static; new values added to the data source must be grouped manually unless placed in an "Other" bucket.
2. Bins (Numeric Measures Discretization)
Bins discretize a continuous numerical measure into uniform, equal-sized numeric containers.
- Data Type: Created from Continuous Measures (Right-click Measure ->
Create -> Bins). - Icon: Indicated by a Histogram Bin icon (📊) in the Data Pane.
- Primary Purpose: Bins convert continuous numeric data into discrete binned dimensions used to build Histograms.
- Bin Size: Can be configured statically or driven dynamically using a Parameter.
3. Sets (Subset Membership Conditions)
Sets are custom fields that define a subset of data based on specific conditions.
- IN / OUT Status: A set separates data into two categories: IN (members that meet set criteria) and OUT (non-members).
- Icon: Indicated by a Venn Diagram Set icon (◯◯) in the Data Pane.
- Types of Sets:
- Static Sets: Created by manually selecting specific marks or dimension values in a view (Right-click marks ->
Create Set). Members do not change when underlying data updates. - Dynamic Sets: Defined by conditional logic or Top/Bottom N criteria (e.g., Top 10 Customers by Sales). Members update dynamically as underlying data changes.
- Static Sets: Created by manually selecting specific marks or dimension values in a view (Right-click marks ->
- Combining Sets: You can combine two sets created from the same dimension using Combine Sets:
- All Members (Union): Includes all members from both sets.
- Shared Members (Intersection): Includes only members present in both sets.
- Except (Difference): Includes members in Set 1 but excludes members in Set 2.
- Sets in Calculations: Sets act as Boolean expressions in calculations (e.g.,
IF [Top Customers Set] THEN [Sales] ELSE 0 END).
Comparison Matrix: Groups vs. Bins vs. Sets vs. Filters
| Feature | Groups | Bins | Sets | Context Filters |
|---|---|---|---|---|
| Input Type | Discrete Dimension | Continuous Measure | Dimension | Any Dimension/Measure |
| Output Field | Custom Dimension | Binned Dimension | IN/OUT Boolean Field | Filtered View / Context Table |
| Icon in Data Pane | Paperclip (📎) | Histogram Bin (📊) | Venn Diagram (◯◯) | Grey Pill on Filters Shelf |
| Dynamic Ability | Static (manual) | Fixed or Parameter-driven | Dynamic (Rule/Top N) | Dynamic |
| Pipeline Step | Dimension Level | Dimension Level | Step 4 (Top N / Sets) | Step 3 (Context) |
In Tableau's Order of Operations, which filter type evaluates BEFORE Top N filters and FIXED Level of Detail (LOD) expressions?
How does a Table Calculation Filter (such as LOOKUP(SUM([Sales]), 0)) behave differently from a standard Dimension Filter?
What is the main structural difference between a Group and a Bin in Tableau Desktop?