Open In App

Types of filters in Tableau and their Order of Operations.

Last Updated : 05 Nov, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Tableau is one of the most used visualization tool around the world. It has many different features within it which makes analyzing and visualizing the data easier. One of those are different types of filters in Tableau. Filters play a major role while analyzing data. They can restrict the amount of data according to the requirements. That could be very helpful in driving insights from the data and visualizing them.

There are various types of filters in Tableau which can be applied both in data source section and Filters section of any sheet.

ds-page

Data source section

sheet-(1)

Filter section in Worksheet

And, You may have also applied various filters in the view or to the data source expecting one to apply first so that it could work in a way. But Tableau has established an order in order to decide which filter should be applied first. Order of operations in Tableau Filters might not seem like something very important to learn. But, trust me, It is going to help in many different scenarios where you could not find a solution.

Here are the types of filters in Tableau in the order they get applied.

  1. Extract Filters
  2. Data source Filters
  3. Context Filters
  4. Dimension Filters
  5. Measure Filters
  6. Table calculation Filters

Let us go through them in detail.

While connecting to a data source in tableau, There are two types of connections which we could make:

  • Live Connection: Live connection is nothing but the data source will be connected to the Tableau in real time. Whenever there is a change in the connected data source, we could see them in the Tableau workbook connected to it too.
  • Extract Connection: Extract connection is when we want to extract the data source and store it in Tableau. Changes in the data source won’t be applied in the workbook. We have to refresh the extract manually if we want the changes to be applied.

Extract Filters: Using extract filters, we can restrict the data accordingly while extracting the data into tableau from the data source itself. So that the amount of data in Tableau could be decreased which is effective for the performance.

  • Step 1 – Click on Edit button .
  • Step 2 – You will be seeing multiple options including the filters section as in the below image. Click on Add over there and you would be able to add different types of filters.
13

Extract Filters

Data Source Filters: These are the filters which can be applied while creating a data source. These are applicable for both Live and extract connections. These can be used to limit records of the data set which makes it faster for any uploads.

  • Step 1 – Click on Add button.
  • Step 2 – A dialogue box will be opened and click on add again.
  • Step 3 – Add filters accordingly.
imresizer-1697030867403-(1)

Data source filter

Context Filter: Context filters are the view filters which gets applied first before any other filter in the view. Based on that filter, A context is created for that particular view. A new data set is created for that particular worksheet. All the Dimension, Measure and Table calculation filters can be converted into context filter in order for them to be applied first.

  • Step 1 – Right click on any filter.(As you could see the city field in filters section, Right click on it)
  • Step 2 – Then a list of option would be shown as in the below image. Click on “Add to context”.

Screenshot-(484)-(1)

  • That particular filter will be turned out to grey color( A context filter is always shown in grey colour unlike other view filters).

fy-(1)

Dimension Filter: Dimensions are the independent fields which has dimensional data. Dimension filters are used to filter the view based on any type of dimensions(eg: Country names, Products). To apply the dimension filter, Follow the below steps:

  • Step 1 – Drag the particular field to the filters section.
  • Step 2 – Select the filter accordingly and click on ok.

Measure Filter: Measures are the fields containing quantitative data which are also called as Measure values in Tableau. Measure filters are used to filter the view based on any measure values(eg: Sales, Profit). Applying the filter is similar to applying dimension filters.

Table Calculation Filter: In Tableau, we can create calculations based on any dimensions and measures. Those fields are called as Calculated fields. If those fields are used to filter the data, those are called as Table calculation filters. Applying these filters is also similar to Dimension and Measure Filters.

Above are all the basic type of filters in Tableau which follows order of operations as mentioned. But to apply any of those filters, You will have to define the logic for any particular filter. You will have to select a field and have to provide a condition for the data to get filtered. Let us discuss about the basic logic options which tableau provides the user with:

  • General: General option basically provides you the choice to select from the list of values of that particular field. In the below picture, we have chose customer name as the field to filter upon. It shows all the values in that particular field to select from.
  • We can see three radio buttons over the top named Select from the list(which shows you you all the values in field to select from), Custom value list( which asks you to manually enter the values) and Use all(which selects all the values present).

You also have an exclude option over there as in the below image. You can select the values which you want to exclude from the list and check the exclude option, so that only those values are excluded.

gen

  • Wildcard: This is basically a string logic which checks for the matching value. There are four options as you can see in the below image. You have to enter some value manually in the Match value box and have to select from those four based on your requirement.

Exampple for Wildcard fillters.

Customer Names:
Sheetal, Kasish, Asis, Greeshma, Karishma, Kasim, Rithesh, Aswin, Mohak

Match Value field: sh

Output:

Contains – Sheetal, Kasish, Greeshma, Karishma, Rithesh, Ashwin.

Starts with – Sheetal.

Ends with – Kasish, Rithesh,

Matches exactly – No name as there is nothing which matches exactly

wildcard

  • Condition: Here, you can filter the values based on any other field or based on using formula which might include any number of fields.
    Example: To select those customers whose order count is more than or equal to 5.
    To select those customers who ordered twice but has demand more than 1000.
    condition
  • Top: This filter is mostly used when you want to filter out Top or Bottom values from the list based on any other field or fields.
    Example: Top 10 Customers based on orders.
    Bottom customers based on demand and whose orders are less than 3.
    top


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads