Chapter 12. An Introduction to Calculated Fields
Possibly the most powerful feature of Tableau is its ability to allow authors to create new data from existing data through calculated fields. Calculated fields can be used to create new dimensions such as segments, or new measures such as ratios. They can also be used with any data type, a multitude of functions and aggregations, as well as logical operators, making the calculated results virtually limitless. This chapter will introduce calculated fields by walking you through how to create two new measures and one new dimension in the Sample – Superstore dataset.
Why Use Calculated Fields?
You may be wondering what’s with all the praise regarding calculated fields? After all, I’ve also suggested that it’s best to prepare your data as much as possible before it gets to Tableau, and that data should include all of the required fields for your analysis. Right?
There are many reasons to leverage the calculated fields functionality in Tableau. Here are just a few:
-
To segment your data in new ways on the fly
-
To prove a concept such as a new dimension or measure before making it a permanent field in the underlying data
-
To filter out unwanted results for better analyses
-
To take advantage of the power of parameters (introduced in Chapter 14), putting choice in the hands of your end users
-
To calculate ratios across many different variables in Tableau, saving valuable database processing and storage resources
To bring the concept ...
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.