From the course: Tableau Essential Training

Present Tableau operators and built-in functions - Tableau Tutorial

From the course: Tableau Essential Training

Present Tableau operators and built-in functions

- [Instructor] One of the best aspects of Tableau is the selection of built-in functions and operators that let you create calculations quickly. In this movie, I will describe some of the more frequently used operators and built-in functions that will save you time and help you gather important information about your business. Starting with mathematical operators, most of these will probably be familiar to you. Use the plus sign for edition and you can add two dates together, and you can also use it to join or concatenate two strings. The minus sign is for subtraction, again including dates and also negation. The asterisk is multiplication, and the forward slash indicates division. Other operators that might not be as commonly used are the percent signed for modular division, which returns a remainder. So if you divide three by two, you will have a remainder of one and modular division tells you that number left over. The carrot is used for exponents. So two carrot three would be two to the third power, or eight. And then, you have the usual range of comparison operators. Equal is also used here for comparison. Then you have greater than, less than, greater than or equal to, less than or equal to, and not equal to in Tableau uses a less than sign, followed by a greater than sign. Finally, there are the logical operators and the most commonly used ones are, AND, which means both or all conditions must be true, OR, which indicates that at least one condition must be true, and NOT, which means that no conditions may be true. Now, let's go on to describe some commonly used functions. SUM, which is by far the one you'll use the most finds the SUM of a set of values. AVG finds the average, and note that this is different from the Excel function, which spells out the word average. So just keep in mind that there is that difference if you're an Excel user. MIN and MAX find the smallest and largest values, minimum and maximum. Standard deviation is used in statistics, and that finds the standard deviation of a set of values. That function is STDEV. Other common use functions are ABS, which returns the absolute value or distance from zero of a number. So the absolute value of minus three would be three, because that's how far it is from zero. CEILING rounds the number up to the next largest integer. So 13.1 would be rounded up to 14. FLOOR rounds the number down to the previous integer, regardless of the decimal component. So you can think of it as the opposite operation of ceiling. In this case, 13.9 would have a FLOOR of 13 because you truncate or remove the decimal. Finally, if you want to round a number to a specific number of digits, then you can use the round function. So you have the number that you're rounding, say 14.91, and you round to a specified number of digits to the right of the decimal point. So 14.91 rounded to one digit to the right of the decimal point would be 14.9. If you round two zero digits, then you would have 14.91 rounded up to 15. Any number of 0.5 or greater is rounded up, and any decimal component of 0.49 or less is rounded down. So those are the operators and functions that you'll use most often, but you can go to the help system to find a list of others that you can use as well.

Contents