Calculated Fields
Calculated fields in Tableau can be created by selecting the caret at the top right of the Data pane followed by Create Calculated Field. This will open up the calculated field configuration window in which the logic can be entered. There is also a help section that documents every calculation/function available, as well as an example of how to implement it.
Figure 3.1: Calculated field help section – use the dropdown to select the calculation type category
Calculated fields allow users to combine existing fields and apply transformational functions to the values referenced. Values can be hardcoded into the calculation and the outcome will depend on the data type used. For example, typing 2 + 2
into a calculated field will cause the calculated field to return 4
. However, if the 2s are strings, 2 + 2, then the output of the calculated field would be 22. It is not possible to combine different data types; for example, 2
+ 2. It is...