Conditional Filters in Tableau

In this article, we will show you How to create Condition / Conditional filters in Tableau with an example.

Before getting into this Tableau conditional filters demo, Please refer to Filters to understand the basic filtering techniques. For these Conditional Filters in the Tableau demo, we will use the data source we created in our previous article. Please visit the Data Labels in Reports article to understand the Tableau Data Source.

First, Drag and Drop the English Product Name from the Dimension Region to the Rows Shelf and the Sales Amount Measures region to the Columns Shelf. By default, it will generate the Bar Chart as shown below.

Conditional Filters in Tableau

In this Tableau conditional filters example, we will add a filter condition on the English Product Name. First, please click on the down arrow beside the Product Name present in the Row Shelf will open the menu as shown below. Here, you have to select the Filter.. option.

Conditional Filters in Tableau 2

Once you select the Filter.. option, a new window is opened to create a filter.

By Field option in Tableau Conditional Filters

Following is the list of options available in this Tableau conditional filters section:

First Dropdown List: By default, this will select the Measure value present in the record. But you can change the field by clicking the down arrow. When you click that down arrow, it displays all the Measures and Dimensions present in the data source.

Choose the Column Name

Second Dropdown List: By default, this will select the Aggregate Function applied to the Measure value. But you can change the function by clicking the down arrow. When you click that down arrow, it displays the list of functions available for that Measure.

Select the Aggregate Function

Third Dropdown List: By default, this will select the = operator. But you can change the operator by clicking the down arrow. When you click that down arrow, it displays the list of available assignment operators.

Select teh Conditional Operator like less than

Load: When you click on this button, the Filter window will load the Minimum and Maximum values into their respective textbox fields. This will help you to understand the data.

Conditional Filters in Tableau 8

From the screenshot below, you can observe that we are selecting the By field section. Next, we selected the Sales Amount as the condition, Sum as the Aggregate function, and used the >= operator. And lastly, we added a 1,000,000 value in the text box.

Conditional Filters in Tableau 9

The below Tableau conditional filters report displays all the records whose Sum of Sales Amount is greater than or equal to 1,000,000.

Conditional Filters in Tableau 10

Tableau Conditional Filters By formula

Here, you can write your own custom and more complex conditions as the Filter condition in Tableau. While you type any letter in that Text field, Tableau intelligence will display the list of available options, such as Filed Name and function names.

From the screenshot below, you can observe that we are selecting the By Formula section. Next, we added SUM([SalesAmount]) >= 1000000 code

Conditional Filters in Tableau 13

The following tableau conditional filters report displays all the records whose Sum of Sales Amount is greater than or equal to 1,000,000.

Conditional Filters in Tableau 14

The following are the remaining filters.

  1. Context Filters
  2. Data Source Filters
  3. Extract Filters
  4. Filters on Dimensions
  5. Filters on Measures
  6. Quick Filters
  7. Selection Filter
  8. Slicing Filters
  9. Top and Bottom Filters
  10. Keep and Exclude Filters
  11. Action Filters
  12. Parameters
  13. String Parameters