We already know how to create custom fields.
We did it two times in our previous lesson creating the “Years” and “Months”
fields.
In this lesson, we’ll spend some time describing some of the other ways you can transform your
source data and create custom fields.
Remember, we shouldn’t go too far with these, as Tableau’s main purpose is visualization,
and not data creation or modeling.
However, sometimes it can be really handy to perform certain manipulations once we’ve
loaded our data into Tableau and we need a certain type of analysis.
Ok, here we go!
The typical Tableau operators you’ll need to remember are:
+ (plus) for addition - (minus) For subtraction,
*(star) For multiplication, / (forward slash) for division,
And ^ (caret) for elevation; Alongside these, you’ll probably need comparison
operators such as: = (equal) ,
> (higher than), < (lower than),
>= (higher or equal), and <> (different than).
The logical functions available in Tableau are like the ones we have in Excel: AND, OR,
and NOT A lot of the functions and symbols used in
Excel can be used when creating a calculated field.
So, for example, some of the most commonly used functions are SUM (for sum), AVG (for
average), MIN and MAX (allowing you to find the minimum and maximum values within a range),
and ABS (returning the absolute value of a number).
And we already saw the text functions LEFT and RIGHT.
They allow us to extract a leftmost and a rightmost number of characters within a string
we’ve specified.
Besides LEFT and RIGHT, we can also use the typical text functions available in Excel
– MID (providing us characters that are in the middle of a text string), UPPER and
LOWER (allowing us to either convert it to all uppercase characters or convert it to
all lowercase characters).
This was a nice recap of the types of operators we can use in order to create custom fields
in Tableau.
For more information on this topic, we’ll add a downloadable file attached to this lesson.
Thanks for watching!