Video | Tableau | Data visualisation | Analytics

The main logical functions in Tableau

A video covering the basics of getting started with logical functions in Tableau.

  • Treat an IF statement as asking Tableau a question: IF condition THEN result ELSE result END, and remember string values must be wrapped in speech marks to match your data exactly.
  • Use ELSEIF to chain multiple conditions, but always close the chain with a single ELSE; you can nest entire calculations or further IFs after any THEN.
  • AND requires both conditions to be true, OR only one; at row level an AND check must reference different fields, since one row can't hold two genres simultaneously.
  • IFNULL([field], 0) is a shorthand that replaces nulls with a value, doing the same job as IF ISNULL or ZN but far more concisely.
  • IIF(test, true-result, false-result) writes a single-condition IF/ELSE in three comma-separated parts, a quick hack when you only need one check.

Mock data: Mock data : http://j.mp/3aQqNcB

Logical functions allow you to check whether certain conditions have been met than carry out specific calculations as a result. the form the most fundamental basis for basic calculations in Tableau and in this video I cover 8 of the most used logical functions in one video.

0:00 Intro

0:23 Setting up

1:23 How to use the IF, ELSE, THEN statements

6:47 ELSEIF statement

11:40 OR statement

16:39  AND Logical statement

20:57  IFNULL Statement

23:32  IIF Statement

26:16 Outro