Tableau Filters

What are Tableau Filters?

Tableau filters are extensively used in Tableau to narrow down the data in your dataset, which can be used further for data visualization or analysis purposes. They allow users to focus on a specific set of data from the entire population, thereby reducing the overall data to be analyzed. Tableau provides filters that can be applied to different levels of data, ranging from data sources to data fields, making it a pretty powerful tool for meeting your visualization requirements.

A sample Tableau filter is shown below. You can use the filter on the Segment field to create an interactive visualization of your dataset.

Tableau Filters Intro.jpg

In the next section, we will understand the different types of Tableau filters.

Key Takeaways
  • Tableau Filters are one of the key tools in Tableau to narrow down the data in your dataset for data visualization or analysis purposes. 
  • There are different types of filters supported in Tableau including Extract Filter, Data Source Filter, Context Filter, Dimension Filter, Measure Filter, and User Filter.
  • These filters are executed in a specific order called Order of operations and hence understanding each of these filters can be highly critical for optimal data visualization.

Types

Tableau supports different types of filters, and they are executed in an order called the Order of Operations. These filters include:

  • Extract Filters
  • Data Source Filters
  • Context Filters
  • Dimension Filters
  • Measure Filters
  • User Filters
Tableau Filters Types

#1 – Extract Filters:

These filters are applied for the data extracts and allow you to filter the data fields and choose to include and exclude attributes.

To apply extract filters

Step 1: Navigate to the Data Source tab and select your dataset from the Sheets pane.

Tableau Filters - Extract - Step 1

Step 2: Choose the Connection type as Extract and Click on Edit link.

Tableau Filters - Extract - Step 2.jpg

Step 3: In the Extract Data window, expand the Filters section and click on Add Filter drop-down.

Select the fields in which you want to add the filters.

Tableau Filters - Extract - Step 3.jpg

Step 4: Provide your choice of whether to include or exclude the values. Click on Save Settings.

Tableau Filters - Extract - Step 4 - exclude
Tableau Filters - Extract - Step 4 - Save settings

#2 – Data Source Filters:

These are applicable for Live connection Tableau filter data source. Apply these filters to the data fields and choose to include and exclude attributes.

Step 1: Select your dataset and choose Connection as Live. Click on the Add link.

Tableau Filters - Data Source - Step 1.jpg

Step 2: In the Edit Data Source Filters, Click on the Add -<field to apply filter> – OK.

Tableau Filters - Data Source - Step 2.jpg

Specify the filter conditions and click on OK.

Tableau Filters - Data Source - Step 2 - filter

It will add the filter for your dataset.

Tableau Filters - Data Source - Step 2 - Edit Filter

#3 – Context Filter:

These filters are independent filters that help you to ensure any other filters you define for your visualization pass through these filters.

To create context filters,

Step 1: Create a data visualization by dragging the dimensions and measures to the Rows and Columns section.

Tableau Filters - Context - Step 1

Step 2: Drag the sub-category to the Filters shelf and apply the Tableau filter top 10.

Tableau Filters - Context - Step 2

Step 3: Add more filters to the Filters shelf by dragging the Category field and choosing both Office Supplies and Technology values.

Tableau Filters - Context - Step 3.jpg

Step 4: Right-click on the Category on the Filters shelf and select Add to Context.

Tableau Filters - Context - Step 4.jpg

It will ensure that any filter on the Sub-category passes through the Category. which is a Context filter.

#4 – Dimension Filter:

These filters enable users to apply any filters on dimension/categorical data fields such as Category, Region, Product, etc. To apply a dimension filter,

Step 1: Drag the dimensions and measure to the Rows and Columns section as applicable.

Tableau Filters - Dimensions - Step 1

Step 2: Drag the dimension to the Filter shelf and choose the filter condition.

Tableau Filters - Dimensions - Step 1 - filter

It will create a Dimension Filter for your visualization.

#5 – Measure Filter:

These filters enable users to apply filters to quantitative data based on aggregated values such as SUM, AVERAGE, MEDIAN, MAXIMUM, MINIMUM, etc., using the measures (Sales, Profit, etc.).

To apply the measure filter:

Step 1: Create a visualization using the Dimension and Measures in the Rows and Columns section. Drag Sales to the Filters shelf. Choose Sum and click on Next.

Tableau Filters - Measure - Step 1.jpg

Step 2: Specify the filter condition and click on Apply to create a Measure filter.

Tableau Filters - Measure - Step 2.jpg
Tableau Filters - Measure - Step 2 - Filters

#6 – User Filter:

These filters are user-centric and help you narrow the data view for applicable users, i.e., enabling different data views depending on user context. 

Step 1: Create a data visualization in a new worksheet in Tableau.

Tableau Filters - Use - Step 1

Step 2: Navigate to Server – Create User Filter – Region (the field you want to create the filter).

Tableau Filters - Use - Step 1.jpg

Step 3: Log into the Tableau Server site and specify the users for whom you want to provide access to view your visualization.

Examples

In this section, we will go through different examples demonstrating the Tableau Filters.

Example #1 – Extract Filter

In this example, we will demo creating an extract filter using the Cars dataset. It comprises a collection of used car listings from different locations, including the car’s make, model, year, mileage, price, exterior and interior colors, drivetrain, MPG (miles per gallon), fuel type, and transmission.

Step 1: Import the Cars dataset in Tableau by navigating to the Data Source tab and using the File navigator, i.e., File – Open.

Example 1 - Step 1.jpg

Step 2: Choose the dataset, select the Connection type as Extract, and Click on the Edit link.

Tableau Filters - Example 1 - Step 2.jpg

Step 3: In the Extract Data window, expand the Filters section and click on Add Filter drop-down.

Select the fields you want to add the filter and specify the filter conditions for each field for which you want to apply the filter, as shown below.

Tableau Filters - Example 1 - Step 3.jpg

Once the changes are defined, click on Save Settings to save the changes.

Example #2 – Data Source Filter

In this example, the Oil Production Dataset contains comprehensive insights into oil production across 36 countries from 2021 to 2023, detailing country names, types of production, product specifications, flow information, and corresponding production values. Follow the instructions to create the Tableau filter data source:

Step 1: Import the Oil Production Dataset in Tableau using the File navigator, i.e., File – Open.

Step 2: Choose the dataset, select the Connection type as Live, and Click on the Add link.

Example 2 - Step 1.jpg

Step 3: In the Edit Data Source Filters, Click on Add. Choose the filter value, i.e., Europe, and click OK.

Tableau Filters - Example 2 - Step 3.jpg

It will add the filter to your dataset.

Tableau Filters - Example 2 - Step 3 - filter

Example #3 – Context Filter

For this demo, we have leveraged the same Oil Production Dataset to create a context filter in Tableau.

To create a context filter in Tableau, follow the steps below:

Step 1: Navigate to a new worksheet in Tableau.

Step 2: In the new worksheet, drag the Product to Rows and Value to Columns section.

Tableau Filters - Example 3 - Step 2.jpg

Step 3: Click on the sort descending order icon to sort the visualization as per the value field.

Example 3 - Step 3.jpg

Step 4: Click on the down arrow next to Product and select Filter.

Example 3 - Step 4.jpg

Step 5: On the Filter window, navigate to the Top tab and select Tableau filter Top 10 by Value.

Tableau Filters - Example 3 - Step 5.jpg

Step 6: Add the Flow field to the Filters shelf and choose Consumption Pattern.

Tableau Filters - Example 3 - Step 6.jpg

Step 7: Right-click on the Flow field on the Filters shelf and select Add to Context.

Tableau Filters - Example 3 - Step 7.jpg

Example #4 – Dimension Filter

Now, let’s look at creating a dimension filter using the Vehicle Fuel Consumption dataset. The Vehicle Fuel Consumption dataset contains information on a wide range of vehicles from different years, makes, models, engine specifications, fuel types, and transmission systems.

To create a dimension filter in Tableau, follow the steps below:

Step 1: Drag Fuel Type and City Mpg Ft1 to the Rows and Columns section as applicable.

Example 4 - Step 1.jpg

Step 2: Click on the sort order icon to sort in descending order.

Tableau Filters - Example 4 - Step 2.jpg

Step 3: Drag Fuel Type 1 to the Filter shelf. In the Filter window, navigate to the Wildcard tab and put conditions in place to filter the keyword containing Gasoline.

Tableau Filters - Example 4 - Step 3

It will create Dimension Filter for your visualization, as shown below.

Tableau Filters - Example 4 - Step 3 - Graph

Example #5 – Measure Filter

In this example, we will demonstrate creating a measure filter using the World’s Largest Empires by Area dataset. The World’s Largest Empires by Area dataset contains details on Empires, Maximum land area, and Year of their rulings. 

To create a Measure filter using this dataset, follow the steps outlined below:

Step 1: Navigate to File and select the Open option. Use the file navigator to import the dataset.

Step 2: In the new worksheet, drag the Empire dimension to the Rows section and the Maximum Land area (million sq mi) to the Columns section.

Example 5 - Step 1.jpg

Step 3: Sort the visual by clicking on the sort icon.

Example 5 - Step 3

Step 4: Drag the measure i.e. Maximum Land area (million sq mi) to the Filters shelf.

Example 5 - Step 4

Step 5: Select the At least option and specify the value as 3. Click on the Apply button.

Tableau Filters - Example 5 - Step 5

This will create a measure filter as shown below.

Tableau Filters - Example 5 - Step 5 - Measure

Example #6 – User Filter

To demonstrate the concentric donut chart in tableau, we have used the Numberofinternetusers dataset. This dataset contains internet users across different countries. 

To create this chart, follow the steps outlined below:

Step 1: Import the Numberofinternetusers dataset to Tableau. 

Step 2: In the new worksheet, drag the Entity to the Rows and Number of Internet Users to the Columns section.

Example 6 - Step 2.jpg

Step 3: Navigate to the Server tab – Create User Filter – Select the field (Entity)

Example 6 - Step 3.jpg

Step 4: Log in to your Tableau server with credentials.

Example 6 - Step 4

Step 5: In the User Filter box, provide a name and specify the filter for your user group.

Example 6 - Step 6

Important Things to Note

  • Understanding the order of operation in Tableau may be helpful for you to manipulate the outcomes.
  • Be careful with context filters as they impact the other filters such as dimension filters and are more global in terms of scope.
  • There are lots of cross-dependencies with different filters in Tableau that impact the behavior.
  • While you can apply filters using the Filters shelf, you can also display them as cards allowing you to run variations to display the desired result.
  • While filters narrow down the dataset, it may affect the overall performance as well. Use these filters consciously per your data requirements.

Frequently Asked Questions (FAQs)

1. How do I control the order of operations when using filters in Tableau?

While you can’t control the order of operations when using filters in Tableau as this is Tableau’s internal algorithm, you can only influence it partially. Here’s how to do it:

 • When it comes to the initial filtering, Tableau follows the Extract Filter followed by the Tableau filter data source. However, you can redefine them on the Data Source tab to apply a filter to your dataset.
 • Similarly, you can also convert a dimension filter to a context filter.

2. How can I create interactive filters for my Tableau dashboard?

To create interactive filters for your Tableau filter dashboard, follow the steps below:

 • Display interactive filters for your data visualization
 • Define the options for filter card interaction and visualization
 • Use Filter cards and customize for your requirements

3. Are there any advanced filtering techniques in Tableau?

Multiple advanced filtering techniques in Tableau include:

 • Selection of keep or exclude data points in the visualization
 • Use of Wildcard, conditions, or Top N results
 • Selection of a range of values, At Least, At most, or Special (custom)
 • Filter of Relative Dates, a range of dates, Discrete dates, Latest Date preset, individual dates, or additional date options.

4. How do I ensure consistent filtering across multiple dashboards in Tableau?

To ensure consistent filtering across multiple Tableau filter dashboards, you may follow the below best practices:

 • Use of Global Filters by setting up the filter and applying it to all the worksheets
 • Use Global Parameters to define the action and create standardization
 • Use of dashboard action to sync multiple filters across different worksheets.

This has been a guide to Tableau Filters. Here we explain different types of filters used in Tableau and how to use them with examples & points to remember. You can learn more from the following articles –

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *