Learning Tableau Calculations

Subject Area: Design

Level of complexity: Beginner

Approximate Time to complete: 1 hour

Companion Workbook (twbx): n/a

Additional Resources on the web:

Tableau calculated fields allow you to leverage a variety of built-in functions. Learning what functions are available, what they do, and how to use them has a bit of a learning curve. This document gives you some tips and tricks for understanding and troubleshooting calculation functions.

The entire list of functions is rather large and might be overwhelming to new Tableau users. You can limit the amount of functions being displayed, however, by selecting a category of functions that is relevant to the current analysis you are doing.

Clicking on any individual function gives you an explanation of what the function does and how to use it.

An important part of the function description is the list of parameters that goes inside the parentheses. Some functions only take one parameter, some take zero, and some take more than one. The description also describes the data types that may be used as parameters. You will get an error if you use the incorrect number of parameters or incorrect data types.

For more detailed information, you can click "Help" which will open the Tableau Desktop Guide to the calculations sections.

The help guide is especially of use for the date calculations, because many of them use a special parameter type called date_part which is a string that must match one of the accepted date_parts.

When you finish writing the calculation, but before you press "OK", you will receive a notice that tells you whether you calculation is valid or whether it has errors. If it has errors, be sure to click on the message for an explanation of the errors.

The calculation editor usually gives you enough of a hint to make your calc valid.