We will study logical functions and how Tableau uses them in this article. For now, consider the following two terms:

Let’s go over each logical function with an example one by one. The dataset utilised in the examples provided is Dataset. Check out the online Tableau course to learn more.

AND Function: To view several expressions, use the AND function. The AND Function’s syntax is as follows:

Expression_1 AND Expression_2

It returns True if both of the conditions are met. If not, False is returned.

Logical Functions in Tableau

OR Function: Tableau’s OR function is comparable to an English either-or expression. Tableau returns False if both conditions are false; it returns True otherwise. This Tableau OR Function has the following syntax:

Expression_1 OR Expression_2

IIF Function: The If Else Function in Tableau is simplified to become the IIF function. It will return the first statement if both conditions are true; else, it will return the second statement. This Tableau IF Function has the following syntax:

IIF(Expression, True_statement, False_Statement)

NOT Function: The exact opposite is returned by the Tableau NOT function. True will turn into false, and vice versa. This Tableau NOT Function has the following syntax:

NOT(Expression)

ISNULL Function: Tableau’s ISNULL function will determine if a given value is NULL or not. It returns TRUE if it’s NULL; else, False is returned. The Tableau ISNULL Function has the following syntax:

ISNULL(Expression)

ZN Function: The Tableau ZN function returns 0 for null values and the first values of not-null values. To put things simply, ZN is used in Tableau to replace NULL values with 0. The Tableau ZN Function has the following syntax:

ZN(Expression)

IFNULL Function: You can use Tableau’s IFNULL function to swap out NULL values for your own. The Tableau IFNULL Function has the following syntax:

IFNULL(Expression, Value)

Logical Functions in Tableau

IF Function: In Tableau, one of the most important and practical decision-making functions is the IF Function. The function will return the output if it tests the condition and returns the outcome based on the condition.

IF-END

IF-ELSE-END

IF-ELSEIF-ELSE-END

Case Function: In Tableau, Case Function is a subset of Logical functions. When the test expression is true, these functions are used to carry out the logical test and return the necessary value.

Conclusion To learn more about Logical Functions in Tableau,  check out the Tableau online training.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Join Free Demo Class

Let's have a chat