Conditional Filters in Tableau

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

Conditional Filters in Tableau

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

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

Conditional Filters in Tableau 1

In this Tableau conditional filters example, we are going to add filter condition on 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.

Conditional Filters in Tableau 3

By Field option in Tableau Conditional Filters

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

Conditional Filters in Tableau 4

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

Conditional Filters in Tableau 5

Second Dropdown List: By default, this will select the Aggregate Function that is 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 Measures.

Conditional Filters in Tableau 6

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 assignment operators that are available.

Conditional Filters in Tableau 7

Load: When you click on this button, 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 below screenshot you can observe that we are selecting the By filed section. Next, we selected the Sales Amount as the condition, Sum as the Aggregate function, and used the >= operator. And lastly, we added 1,000,000 value in the text box.

Conditional Filters in Tableau 9

The below Tableau conditional filters report is displaying 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.

Conditional Filters in Tableau 11

While you type any letter in that Text filed, Tableau intelligence will display the list of available options such as Filed Name and function names.

Conditional Filters in Tableau 12

From the below screenshot 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 is displaying all the records whose Sum of Sales Amount is greater than or equal to 1,000,000.

Conditional Filters in Tableau 14