Chapter 13. An Introduction to Table Calculations
Tableau comes with several preset calculations that you can compute with the numbers on a view, including running total, difference, percent difference, percent of total, moving average, and more. These predefined calculations are called table calculations because they compute the result based on a virtual table that includes only the numbers on the view. Table calculations provide several benefits, including:
-
A fast way to create advanced calculations even without knowing the underlying syntax
-
Table calculations can be saved for future use as calculated fields, and because calculated fields can be edited, this is a great way to learn the syntax and the different functions available in Tableau
-
Efficient processing—table calculations are computed on a very small subset of the data source, making them an efficient solution for calculating results
To help introduce table calculations and how to use them, we will be using this simple crosstab:
Table calculations are added to measures, so in order to add a table calculation, click a measure that’s on the view. The fastest way to add a table calculation is to hover over Quick Table Calculation and choose an option:
Here’s how the view looks after choosing the Running Total ...
Get Practical 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.