Video summary

How to Use If/Then Calculations in Tableau - Tableau in Two Minutes

Main summary

Key takeaways

Technology

Overview

This video is a quick tutorial (“Tableau in Two Minutes”) focused on using IF/THEN logic to build a derived/composite field.

What the tutorial demonstrates

  • Uses the Titanic sample passenger dataset (available via a link in the comments/description and on Tableau’s site).
  • Starts with two numeric fields:
    • sibling_spouse
    • parent_child
  • Creates a new calculated field called has family that classifies each passenger based on whether either count is greater than zero.

Step-by-step Tableau calculation

  1. Create a calculated field via Create Calculated Field.
  2. Apply this logic:

    • If parent_child > 0has family
    • Else if sibling_spouse > 0has family
    • Elseno family
  3. Syntax best practice emphasized:

    • You must include END at the end of each IF block.
    • Nested IF statements can make it easy to misplace END, so it’s recommended to keep each IF / ELSEIF / ELSE block complete.

Validation / quick sanity check

  • Places name on Rows (noting Tableau’s warning about using too many members).
  • Adds both original fields to the view alongside the calculated output to visually confirm the results.

Output / intended use

After applying the calculation, the resulting field has family shows:

  • “no family” when both counts are 0
  • “has family” when either count is above 0

The derived field can then be used for downstream analysis or modeling (example mentioned: whether someone survived).

Main speakers or sources

  • Speaker: not explicitly named in the subtitles (host of “Tableau in Two Minutes”).
  • Source/data: Tableau sample Titanic dataset (linked in comments/description and available on Tableau’s website).

Original video