Book Image

Learning Tableau

By : Joshua N. Milligan
Book Image

Learning Tableau

By: Joshua N. Milligan

Overview of this book

Table of Contents (18 chapters)
Learning Tableau
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
8
Adding Value to Analysis – Trends, Distributions, and Forecasting
Index

Creating and editing calculations


A calculation is often referred to as Calculated Field in Tableau. This is because when you create a calculation, it will show up as either a new measure or dimension in the Data window. Calculations consist of code that reference other fields, parameters, constants, or sets and use combinations of functions and operations to achieve a result. Sometimes, this result is per row of data and sometimes it is done at an aggregate level. We'll consider the difference shortly.

There are multiple ways to create a calculated field in Tableau:

  • Select Analysis | Create Calculated Field… from the menu

  • Right-click on an empty area in the Data window and select Create Calculated Field

  • Right-click on a field, set, or parameter and select Create | Calculated Field…

  • In Tableau 9.0 or later, double-click on an empty area on the Rows, Columns, or Measure Values shelves, or in the empty area on the Marks card to create an ad hoc calculation

When you start your calculation from...