Chapter 5Table Calculations and Level of Detail Calculations

Standard calculated fields as introduced in Chapter 4 are always evaluated at the level of the individual mark. With Table Calculations and Level of Detail (LOD) Calculations, you can break out of that mold.

Table Calculations allow you to create computations that span across different marks in your visualization. Predefined Quick Table Calculations make it possible to quickly include several commonly used calculations without having to type any formulas.

LOD Calculations are similar to normal formulas in a calculated field, except that they allow you to define which dimensions should be used to break up the data. In other words, you are not limited by the dimensions used in the construction of your chart.

By the end of this chapter, you will be able to:

  • Understand the order in which different work processes happen in Tableau and how that affects the different types of calculations.
  • Use Table Calculations for in‐depth analyses.
  • Create dimension‐spanning calculations with LOD Expressions.

DIFFERENT TYPES OF CALCULATIONS

Before diving into Table Calculations and Level of Detail Calculations, let's pause for a second and delineate the different types of calculations in Tableau more clearly. Chapter 4 introduced row‐level calculations (simple formulas that do not include aggregate functions) and aggregate calculations (formulas that explicitly define the aggregation with different aggregate functions), which are evaluated ...

Get Visual Analytics with Tableau now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.