Master Tableau From Scratch

Learn Tableau fundamentals, data connections, data preparation, filtering, data modeling, calculations, LOD expressions, visualizations, dashboards, and storytelling through structured practical lessons.

COURSE SYLLABUS

Tableau Filter Hierarchy

Understand how Tableau processes different filter types, how filters interact with one another, and how the order of operations affects the results displayed in a worksheet and dashboard.

1. Introduction to Filter Hierarchy

Tableau filters are used to restrict the data displayed in a visualization. They allow users to focus on specific records, categories, dates, regions or measure values according to their analytical requirements.

When multiple filters are applied to the same worksheet, Tableau evaluates them in a defined order. This sequence is known as the Tableau order of operations or filter order of execution.

Understanding this hierarchy is important because the position of a filter in the execution sequence can influence which records are available to later filters and calculations.

Why Filter Hierarchy Matters

  • Helps understand how Tableau processes filters.
  • Explains differences between Context and Dimension Filters.
  • Helps troubleshoot unexpected visualization results.
  • Improves the accuracy of analytical calculations.
  • Supports better worksheet and dashboard performance.
  • Helps build more reliable business reports.
Source Data All Records Filters Selected Conditions Results Filtered View Filter Hierarchy Controls Data Processing The execution order determines which data is available to subsequent filters and calculations.
Conceptual flow of source data, filtering and final results.

2. Types of Filters in Tableau

Tableau provides several filter types. Each filter operates at a different stage of data processing and serves a specific purpose.

1. Extract Filters

Extract Filters restrict the records included when creating or refreshing a Tableau extract. They help reduce the amount of data stored in the extract.

2. Data Source Filters

Data Source Filters restrict the data available to worksheets using that data source. They are configured at the data source level.

3. Context Filters

Context Filters create a primary subset of data. Other applicable filters, such as Dimension Filters, are evaluated using this context.

4. Dimension Filters

Dimension Filters restrict categorical values such as Region, Category, Customer Name and Product Name.

5. Measure Filters

Measure Filters restrict data based on numerical measures such as Sales, Profit, Quantity or Revenue. They generally operate on aggregated measure values.

6. Table Calculation Filters

Table Calculation Filters operate after table calculations have been computed. They control which calculated results are displayed in the view.

Filter Type Purpose Example
Extract Filter Limits records included in an extract. Extract only 2026 records.
Data Source Filter Restricts data available from a data source. Include only selected regions.
Context Filter Creates a primary filtered subset. Only the West region.
Dimension Filter Filters categorical values. Category = Technology.
Measure Filter Filters measure values. SUM(Sales) greater than 50,000.
Table Calculation Filter Filters calculated results in the view. Display selected rank positions.

3. Tableau Order of Operations

Tableau follows a defined order when evaluating filters and calculations. This order is important when a worksheet contains multiple filters and calculated fields.

The following sequence shows the commonly used order of Tableau's filter and calculation operations.

Tableau Order of Operations 1. Extract Filters 2. Data Source Filters 3. Context Filters 4. FIXED LOD Expressions 5. Dimension Filters 6. INCLUDE / EXCLUDE LOD 7. Measure Filters 8. Table Calculations 9. Table Calculation Filters 10. Final View Results Simplified educational view of the execution sequence.
Simplified order of operations. Other operations, such as table structure, sorting and rendering, are not represented in this illustration.
Important: This is a simplified teaching sequence, not an exhaustive list of every Tableau operation. Tableau's full order of operations includes additional steps and special cases. For example, the position of a FIXED LOD calculation relative to Dimension Filters is particularly important.

4. Understanding Context Filters

A Context Filter creates a primary subset of data. Once a filter is added to context, other applicable filters are evaluated using the resulting subset.

Context Filters are especially useful when a worksheet contains multiple filters and users want one filter to define the data available to other filters.

Example

Consider a sales dataset containing records for multiple regions and product categories. If the West region is added as a Context Filter, other applicable filters work with the West region's records instead of the entire dataset.

All Regions East West North South Context Filter West Available Data West Other applicable filters can now use the selected subset.
A Context Filter creates a subset of records for subsequent applicable filters.

Steps to Create a Context Filter

  1. Open a worksheet in Tableau.
  2. Drag a dimension such as Region to the Filters shelf.
  3. Select the required region, such as West.
  4. Apply the filter.
  5. Right-click the Region filter on the Filters shelf.
  6. Select Add to Context.
  7. Observe that the filter is displayed as a context filter.
Tip: Context Filters can help when dependent filters need to operate on a restricted dataset. However, adding unnecessary context filters may affect performance. Test them with the actual data source.

5. Dimension Filters

Dimension Filters are used to restrict categorical data. They allow users to select specific members from fields such as Region, Category, Segment, Customer Name and Product Name.

Example: Filter by Product Category

Suppose a sales dataset contains three product categories: Furniture, Office Supplies and Technology.

If the user selects Technology in a Dimension Filter, the worksheet displays only records belonging to that category, subject to the other applicable filters.

Steps to Apply a Dimension Filter

  1. Open a Tableau worksheet.
  2. Find a dimension such as Category in the Data pane.
  3. Drag the dimension to the Filters shelf.
  4. Select the required category members.
  5. Click Apply or OK.
  6. Review the filtered visualization.
Dimension Selected Value Result
Region West Only West region records
Category Technology Only Technology records
Segment Corporate Only Corporate segment records
Customer Name Selected customer Records for that customer

6. Measure Filters

Measure Filters are used to restrict data based on numerical values. They are commonly applied to aggregated measures such as SUM(Sales), AVG(Profit) and SUM(Quantity).

Example: Filter Sales Greater Than 50,000

Consider a sales report containing different regions. A Measure Filter can be used to display only the regions whose aggregated sales values meet a selected condition.

SUM(Sales) > 50000

This expression illustrates the condition being applied to an aggregated Sales value. It is not required to create a calculated field when using Tableau's standard measure filter interface.

Steps to Apply a Measure Filter

  1. Open a worksheet containing a measure.
  2. Drag Sales to the view or Filters shelf.
  3. Choose the appropriate measure filtering option.
  4. Select the aggregation and required range or condition.
  5. Apply the filter.
  6. Review the remaining values in the visualization.
Remember: Measure Filters commonly operate on aggregated values. The result can depend on the level of detail in the visualization and the selected aggregation.

7. FIXED LOD and Filter Hierarchy

Level of Detail expressions allow Tableau users to calculate values at a specified level of detail, independently of some aspects of the current view.

FIXED LOD expressions are evaluated before ordinary Dimension Filters. This distinction can affect calculated results.

Example FIXED LOD Expression

{ FIXED [Region] : SUM([Sales]) }

This expression calculates total Sales for each Region, regardless of the dimensions currently displayed in the view.

Why the Order Matters

Consider a worksheet containing a FIXED LOD calculation and a normal Region Dimension Filter. Because FIXED LOD is evaluated before ordinary Dimension Filters, the FIXED calculation may include records that are later removed from the visible view by the dimension filter.

If a filter needs to affect the records considered by a FIXED LOD expression, adding that filter to context is a common approach.

Context Filter Applied first FIXED LOD Uses context subset Dimension Filter Filter Execution Relationship Context filters can affect the records used by FIXED LOD. Ordinary Dimension Filters are evaluated after FIXED LOD.
Simplified illustration of the relationship between Context Filters, FIXED LOD and Dimension Filters.
Best Practice: When a FIXED LOD calculation must respect a particular filter selection, test the result with and without that filter added to context.

8. Table Calculation Filters

Table Calculation Filters are applied after table calculations have been computed. They control which calculated results are displayed in the view.

For example, a worksheet may calculate the rank of products based on total Sales. A table calculation filter can then be used to display only selected rank values.

Example: Display Top 5 Ranked Products

RANK(SUM([Sales]))

This table calculation ranks products according to their aggregated Sales values. A filter based on the resulting rank can be used to display selected positions.

Steps to Apply a Table Calculation Filter

  1. Create a worksheet with Product Name and Sales.
  2. Add a table calculation such as Rank.
  3. Configure the calculation's addressing and partitioning.
  4. Create or use the required filter based on the table calculation.
  5. Choose the rank values to display.
  6. Review the resulting worksheet.
Important: Table calculations depend on the dimensions in the view and their addressing and partitioning settings. A ranking calculation may produce different results when the view structure changes.

9. Practical Example: Build a Filtered Sales Report

In this practical example, we will use multiple filter types to create a sales report focused on a selected region and product category.

Sample Business Requirement

A sales manager wants to analyze Technology category sales for the West region and display only the relevant sales values.

Filter Configuration
Context Filter Region = West
Dimension Filter Category = Technology
Measure Filter Apply the required Sales threshold
Visualization Sales by Product

Implementation Steps

  1. Connect Tableau to a sales dataset.
  2. Create a new worksheet.
  3. Drag Region to the Filters shelf.
  4. Select West and add the Region filter to context.
  5. Drag Category to the Filters shelf.
  6. Select Technology.
  7. Drag Product Name to Rows.
  8. Drag Sales to Columns.
  9. Apply the required measure condition if needed.
  10. Review the filtered sales visualization.
Expected Result: The worksheet focuses on Technology products within the West region, subject to the additional measure conditions applied.

10. Common Filter Hierarchy Problems

Problem Possible Reason Solution
FIXED LOD does not change after filtering FIXED LOD is evaluated before ordinary Dimension Filters. Check whether the filter should be added to context.
Dependent filter shows unexpected members The filters may not be configured in the required hierarchy. Review Context Filter settings.
Measure Filter gives unexpected results Aggregation or view level of detail may differ. Check the measure aggregation and worksheet structure.
Rank values change unexpectedly Table calculation addressing or partitioning changed. Review the table calculation configuration.
Extract contains more data than expected Extract Filter settings may not have been applied as intended. Review extract filters and refresh the extract if necessary.

11. Best Practices for Filter Hierarchy

  • Understand the order of operations before combining multiple filters.
  • Use Context Filters only when they are needed for the analysis.
  • Check FIXED LOD expressions when filter results appear unexpected.
  • Use Dimension Filters for categorical data.
  • Use Measure Filters for numerical and aggregated values.
  • Verify table calculation addressing and partitioning.
  • Test filter combinations using representative datasets.
  • Keep dashboards simple and avoid unnecessary filters.
  • Review performance after adding multiple filters.

Lesson Summary

Tableau Filter Hierarchy explains how different filters and calculations are evaluated during worksheet processing. Extract, Data Source, Context, Dimension, Measure and Table Calculation Filters operate at different stages.

Context Filters create a primary subset of data. FIXED LOD expressions are evaluated before ordinary Dimension Filters, while table calculation filters operate after table calculations have been computed.

Understanding the order of operations helps users troubleshoot calculations, create accurate reports and design reliable Tableau dashboards.