Introduction to calculations
A calculation is often referred to as a Calculated Field in Tableau because, in most cases, when you create a calculation, it will show up as either a new measure or dimension in the data pane. Calculations consist of code that's made up of functions, operations, and references to other fields, parameters, constants, groups, or sets. This code returns a value. Sometimes, this result is per row of data, and sometimes it is done at an aggregate level. We'll consider the difference between Tableau's major calculation types next.
The four main types of calculations
The most fundamental way to understand calculations in Tableau is to think of four major types of calculations:
- Row-level calculations: These calculations are performed for every row of underlying data.
- Aggregate calculations: These calculations are performed at an aggregate level, which is usually defined by the dimensions used in the view.
- Level of...