Video summary
How to Use If/Then Calculations in Tableau - Tableau in Two Minutes
Main summary
Key takeaways
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_spouseparent_child
- Creates a new calculated field called
has familythat classifies each passenger based on whether either count is greater than zero.
Step-by-step Tableau calculation
- Create a calculated field via Create Calculated Field.
-
Apply this logic:
- If
parent_child > 0→has family - Else if
sibling_spouse > 0→has family - Else →
no family
- If
-
Syntax best practice emphasized:
- You must include
ENDat 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.
- You must include
Validation / quick sanity check
- Places
nameon 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).