Open In App

IF Function in Tableau

In this article, we will learn about if function and its use in Tableau. For this first look into two terms:

How IF function works:



Syntax of IF Function:

This function checks the given <expression> and returns the corresponding value as a result. The syntax is :



IF <Expression1> THEN <Statement1>
ELSEIF <Expression2> THEN <Statement2>
ELSEIF <Expression3> THEN <Statement3>
.....
ELSEIF <ExpressionN> THEN <StatementN>
ELSE <Statement>
END

Dataset used in the given examples is Dataset.

Example 1: (IF-END)

Example 2: (IF-ELSE-END)

Example 3: (IF-ELSEIF-ELSE-END)

Article Tags :