Context Filters in Tableau allow us to create dependent filters by establishing a hierarchy between them. Essentially, a context filter sets the context for other filters, meaning all other filters are applied relative to the data defined by the context filter. This is useful when we want to improve performance or create more precise filtering logic in complex dashboards.
Use of Context Filters
Context Filters are particularly useful because they:
- Improve performance when working with large datasets.
- Create hierarchical filtering, where one filter affects the results of others.
- Allow more precise control over which data is displayed in complex visualizations.
Steps to Apply a Context Filter
To apply a content filter in Tableau:
- Open Tableau and connect to a dataset.
- Drag and drop a sheet into the workspace and open a worksheet (e.g., Sheet1).
- Build a visualization by dragging dimensions and measures into the view.
- Add a filter by dragging a field to the Filters shelf.
- Set the filter as a Context Filter by Right-clicking the filter on the Filters shelf.
- Select Add to Context.
The filter card will turn gray, indicating it is now a context filter.
Note: Any other filters applied afterward will now operate relative to the context filter.
Example Scenario
To show how we can implement a content filter in tableau, let us see an example.
1. Add a Filter by an Attribute
Apply a filter for Region and set it as a context filter.

2. Apply Another Attribute for Context Filtering
Apply a filter for Product Category. Only products within the selected regions will be displayed because the Region filter sets the context.

Removing a Context Filter
To remove a context filter:
- Right-click the context filter on the Filters shelf.
- Select Remove from Context.
- The filter returns to a standard filter and no longer defines the context for other filters.
