Skip to main content
Albero Academy

Calculated Fields

Create new fields with formulas — Tableau's calculation language.

Calculations9 min

A calculated field is a new field you define with a formula, using existing fields, functions and operators. It's how you go beyond the raw data — computing profit ratios, categorising values, cleaning text.

Row-level calculations

a calculated field
Profit Ratio = [Profit] / [Sales]
Full Name = [First Name] + " " + [Last Name]
Discounted = [Sales] * 0.9
// Logic with IF
Tier = IF [Sales] > 100000 THEN "High"
ELSEIF [Sales] > 50000 THEN "Mid"
ELSE "Low" END

Function families

Tableau has string (LEFT, CONTAINS, TRIM), number (ROUND, ABS), date (DATEDIFF, DATEPART), and logical (IF, CASE) functions — very much like Excel and SQL.

Key takeaways

  1. 01A calculated field defines a new field with a formula from existing fields.
  2. 02Reference fields in [square brackets]; use IF/ELSEIF/ELSE/END for logic.
  3. 03String, number, date and logical function families cover most needs.
  4. 04Row-level calcs compute per underlying row and appear as new fields.

Finished this chapter?

Mark it complete to track your progress through Tableau.