Logical Functions in Tableau: How can we utilise them?

A crucial technical skill required to proficiently harness the powers of Tableau is the skill to understand and effectively implement Calculations.

Calculations within Tableau utilise existing fields in the data set, and Functions to create a new Data Field.

Functions within a calculation can be thought of as the type of instruction provided to create a new Calculated Field.

Today, I will focus on Logical Functions and how we can best utilise them. Logical functions are, well, as it says on the tin, logical.

Some of the most commonly used logical functions include IF, THEN, ELSEIF, ELSE, AND, and END.

One way we can utilise these functions is as follows: Assume we have data with information about the size of Sales transactions and we wish to categorise them into the following categories, 'Low', 'Medium', and 'High'. We can use logical functions to do this.

IF [Sales Amount] < 1000 THEN
"Low"
ELSEIF [Sales Amount] >= 1000 AND [Sales Amount] < 5000 THEN
"Medium"
ELSE
"High"
END

Pretty logical, right?

This simple calculated field allows us to put all Sales Transactions into Groups. These groups can aid us when attempting to visualise the disparity between sales transactions.

Photo by Cytonn Photography / Unsplash

Author:
Patrick Maguire
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab