Types of Filters in Tableau: Condition by Formula, Extract, Context

Types of Filters in Tableau: Condition by Formula, Extract, Context

Data can be organized and simplified by using various techniques in Tableau. We will use the “Sample– Superstore.csv” text file for demonstration in this tutorial.

In this tutorial you will learn

Types of Filters:

The channels can be applied in a worksheet to confine the quantity of records present in a dataset. Different kinds of channels are utilized in Tableau Desktop dependent on various purposes. The various sorts of channels utilized in Tableau are given beneath. The name of channel types are arranged dependent on the request for execution in Tableau.

Primis Player Placeholder

  1. Extract Filters
  2. Data Source Filters
  3. Context Filters
  4. Dimension Filters
  5. Measure Filters

Extract Filters:

Concentrate channels are utilized to channel the removed data from data source. This channel is used just if the client removes the data from data source.

When the content record is associated with Tableau, you can see the live and concentrate alternative in the upper right corner of data source tab. Live Connection straightforwardly associates with a data source. Concentrate connection removes the data from data source and makes a neighborhood duplicate in Tableau vault. The procedure for making an extricating channel is given as follows.

Step 1) After connecting the text file into Tableau,

  • Click on “Extract” radio button as shown in the figure.

This will create a local copy in Tableau repository.


Step 2) Next,

  1. Click on the ‘Edit’ option placed near to Extract button.
  2. It opens “Extract data” window. Click on ‘Add’ option present in the Window.


Step 3) “Add Filter” Window is open to select the filter conditions.

You can choose any of the fields and add as extract filter. In this example, we have selected’Category’ as extract filter.

  1. Select ‘Category’ from the list
  2. Click on ‘OK.’


Once you click on OK button, it opens a filter window.


The filter window has different alternatives to filter ‘Category’ in view of different use case. All the utilization cases and its filter conditions are clarified beneath.

Filter condition in Tableau

By default, filter window opens the “Select from List” option. You can include or exclude the members present in the field using this option.

To include you can

  1. Select the members
  2. Click on OK.


To exclude the selected members,

  1. Click on exclude checkbox
  2. Select the members to exclude
  3. Click on OK.


There are two more option in the “Select from List”.

  1. All
  2. None


This option includes or excludes all members present in the field. In this example, all members are included by clicking on “All” option.

Step 1)

  1. Select ‘All’ option.
  2. Click on OK


Step 2) Next,

  1. It shows extract data filter. The filter condition is also added in the extract filter window.
  2. Click on OK to add the extract filter.


To exclude all the individuals in the rundown, first, click on ‘Exclude’ button. At that point select ‘All’ alternative and snap on OK. This procedure includes the filter in extract data filter window.



On the off chance that you need clear all the choice made in the filter window and start another determination, you can utilize this ‘none’option. None choice clears all the choice made in the filter window. When it is cleared you can choose the new individuals.

  1. Click on the ‘None’ option. Select the new members to be added as filter.
  2. Click on OK to add the extract filter.


Use Case 2: Custom Value List

A custom value list allows the user to type the member name and filter the field accordingly. A custom value list can be created by following the given procedure.

Step 1) In the Filter Screen

  1. Click on “Custom value list” radio button.
  2. Type the member name.
  3. Click on ‘+’ symbol to add the name in the list.
  4. You can add multiple members in the list and click on OK


There is an option in the window “Include all values when empty.” It can be selected to include all values present in the field when the selected member has no data.


Clear List option clears the customs value list.


Use Case 3: Use all

This option selects all the members present in the field.


Use case 4: Wildcard

Wildcard option is used to filter the fields based on given wildcard match. Users can type the character and filter the field based on the match. The different types of matches are given as follows.


ContainsSelect the members if the member name contains typed characters.
Starts withSelect the members if the member name starts with typed characters.
Ends withSelect the members if the member name ends with typed characters.


Step 1)

  1. Select the “Wildcard” tab.
  2. Type the characters to match.
  3. Select the type of match. In this example “Contains” match type is selected.
  4. Click on OK.


Use Case 5: Filter on Condition

This option is used to filter the data set by giving several conditions. Filer condition based on field is given below.

By Field:

  1. Select the ‘Condition’ tab in Filter Window.
  2. Click on radio button ‘By field.’
  3. Select the name of the field to be filtered from the drop-down list.
  4. Select the aggregation type like Sum, average and median from the drop-down list.
  5. Choose the operator from the drop-down.
  6. Enter the value to filter the selected field.
  7. Click on OK.


In the above example, the dataset is filtered to see the data where the sum of sales is greater than 1000.

The range of Values:

This option shows the minimum and maximum value of the selected field by clicking on ‘Load’ button. It can be used to refer the values.


Filter Condition by Formula:

You can write a formula to filter the dataset using this option. The procedure is explained below.


  1. Click on radio button ‘By formula.’
  2. Enter the formula in the box as shown in the figure.
  3. Click on Ok.


In the above example, the written formula filters the data where sum of sales is greater than 1000.

Use Case 6: Top or bottom filters

This option is used to select top or bottom ‘n’ number of records.

By Field:

Step 1)

  1. Select ‘Top’ tab from the filter window.
  2. Click on radio button ‘By field’.


Step 2)

  1. Select ‘Top’ or ‘Bottom’.
  2. Choose the number of records.
  3. Select the field.
  4. Choose the aggregation type.
  5. Click on Ok.


In the above example, the filter restricts the data set to show top 10 records based on the sum of sales.

By Formula:

The top or bottom condition can also be given through formula.


  1. Click on the radio button ‘By Formula’.
  2. Select ‘Top’ or ‘Bottom’.
  3. Choose the number of records.
  4. Enter the formula.
  5. Click on OK.

Data Source Filter:

A data source filter is used to filter the data in data source level. It can restrict the records present in the data set. This filter is similar to extract filter on securing the data. But data source filter and extract filter is not linked to each other. Data source filter works on both live and extracts connection. The procedure to select data source filter is given as follows.

Context Filter:

A Context filter is an autonomous filter that can make a different dataset out of the first data set and process the determinations made in the worksheet. At least one clear cut filter that isolates the dataset into significant parts can be utilized as a setting filter. All different filters utilized in the worksheet works dependent on the choice of setting filter. The elements of setting filters can be clarified through an exceed expectations sheet.


The figure shows a sample dataset. From the dataset, it is identified that ‘Category’ can be used as context filter as it can divide the dataset into major parts. Once the filter is applied to the dataset, the following data can be obtained.


At the point when the category “Furniture” is chosen, the data accessible in the specific category is appeared in the figure. Different filters that can be applied in the sheet will be subject to the category filter. This is the fundamental capacity of utilizing setting filter. Tableau makes an impermanent dataset in vault motor dependent on the setting filter determination. When setting filter is chosen, all different determinations and filters rely upon the choice of explicit setting filter. The transitory table or data set that is made on choosing setting filter loads at whatever point the setting filter is changed.

Apply Context Filters in Worksheet:

Any dimension can be added as context filter by following the steps given below:

Step 1) The dimension to be added as context filter needs to be added in filter section box as given in the image.


Step 2) Right click on the dimension added in the filter section and select “Add to Context” option.


Step 3) Once the filter is selected as a context filter, the color of dimension box changes to grey color. This grey color box is an indication of context filter.


Removing Context Filter:

Any context filter can be changed back to normal filter by selecting the “Remove from Context” option which is available when right-clicking on the dimension. The color of dimension box will also change back to blue color as an indication.


Advantages of Using Context Filters:

Improve Performance:

At the point when setting filter is utilized in huge data sources, it can improve the presentation as it makes an impermanent dataset part dependent on the setting filter determination. The presentation can be adequately improved through the determination of major all out setting filters.

Dependent Filter Conditions:

Setting filters can be utilized to make subordinate filter conditions dependent on the business necessity. At the point when the data source size is enormous, setting filter can be chosen on the significant category, and other applicable filters can be executed.

Dimension Filters:

When a dimension is used to filter the data in a worksheet, it is called as Dimension filter. It is a non-aggregated filter where a dimension, group, sets and bin can be added. A dimension filter can be applied through the top or bottom conditions, wildcard match and formula.

The members present in a dimension can be included or excluded from the list using this filter. Dimension filter can be shown in a sheet or dashboard to change the filter condition dynamically. The process for adding a dimension as the filter is given as follows.

Step 1) Go to a worksheet as given in above topics and follow the steps.

  1. Select a dimension from the dimension list. In this example ‘Category’ is chosen from the dimension list. Drag the dimension into ‘Filters’ box.
  2. It opens the ‘Filter’ Window. Select the member from the list.
  3. Click on OK.