There are 3 main types of calculations in Tableau Desktop that can be used to create calculated fields:

This blog focuses on the first type, namely basic calculations (or basic expressions).
What are calculations used for?
- If the data you need for analysis doesn't exist in the original data source.
- If you have Sales and Cost fields but not Profit, you can calculate Profit (using a calculated field).
- If you want to transform values in your visualisation.
- If you want to calculate the difference in Sales from one quarter to the next (using a table calculation).
- If you want to categorise data.
- If you want to colour bars in a bar chart to show if Profit was above or below 0.
Calculated Fields
Calculated fields create new data from data that already exists in your data source by creating a new field (column). The original data remains unchanged.
Calculated fields are generally used to:
- Change the data type of a field (convert a string to a date)
- Aggregate data (using mathematical functions like SUM( ), AVG( ), etc.)
- Filter
Calculated Fields Interface

Calculated fields are created using different types of calculations.
Basic Calculations
There are two types of basic calculations in Tableau Desktop, row-level calculations and aggregate calculations.

Row-Level Calculations

Aggregate Calculations


The next blog titled 'Calculations in Tableau Desktop Part 2: Level of Detail (LOD) Expressions' is the second part of this series and will explain what LODs are and why we need to use them!
