TABLEAU TRAINING | TABLEAU CONSULTING | TABLEAU LICENSE SALES
Ablaze Group Training
Tableau Calculated Fields
It won’t be too long before you encounter a situation where the data in your underlying data source or database won’t fit your analysis needs exactly. For example, you may want to calculate the result of one or more numeric measures in your data source to determine a desired number you wish to analyze. Or, a dimension in the data source may not be organized precisely in the way you wish to use it.
For these types of situations, Tableau provides calculated fields. A calculated field is a custom calculation (often simply referred to as a formula) that can use combinations of existing dimensions and measures from the underlying data source, combined with built-in operators and functions, to create a custom result. The resulting calculated field can be placed on a shelf or card just like a standard dimension or measure. Below are some examples.
Create a calculated field called Total Cost:
[Quantity] * [Unit Cost]
Add Markup percentage:
[Total Cost] + [Total Cost] * [Markup %]
Create one combined customer name with a calculated field:
[Customer First Name] + “ “ + [Customer Middle Initial] + “. “ +
[Customer Last Name]
Capitalize the first letter of an inconsistent string, and display the remainder in lower case:
UPPER(LEFT([Customer First Name]),1)) +
LOWER(RIGHT([Customer First Name], LEN([Customer First Name]) -1))
Convert a numeric field into an actual date:
DATEPARSE (“yyyyMMdd”, STR ([Date]))
Calculated fields can be created quickly directly on shelves and cards, and may be added to the Data pane for reuse in other worksheets. Our tutorial video, Creating Calculated Fields, introduces you to better and faster ways to explore and analyze your data. Have fun!
Get more on calculated fields, advanced charting and statistics, Tableau Desktop and Server.
Call or email about Ablaze Group Tableau Training.
Online/virtual and onsite classes are forming now.