Table of Contents
Tableau Definitions
As a data visualization tool, Tableau is a software that processes data into a data visualization to help make decisions.
Tableau software is usually used by Business Intelligence and Data Analysts when they want to provide insight from the data they get.
Now if you also want to continue your career as a Business Intelligence or Data Analyst, Tableu Software is a widely used tool that you must know. At least on its features and uses (if your company is not using Tableau software at this time).
Tableau Software Key Features
Highlighted by Simplilearn, Tableau software has 5 functions. They are number functions, string functions, user functions, logical functions, and aggregate functions.
Number Functions
In Tableau software, users may require the application of mathematical operations. In such situations, the utilization of number functions, which are one of the functions provided by Tableau, proves to be advantageous.
ABS
The ABS is used to Return the absolute value of the given value. The Syntax of the ABS function is as shown below.
Syntax:
ABS(Numerical Value)
Example:
ABS(-15) = 15
ACOS
The ACOS is used to return the arc cosine value of the given number. The results are often returned in the measures of Radian.
Syntax:
ACOS(Numerical Value)
Example:
ACOS(0.5) = 1.04719
ASIN
The ASIN is used to return the arc sine of a given number. The results are often returned in the measures of Radian.
Syntax:
ASIN(Numerical Value)
Example:
ASIN(0.5) = 0.5235
ATAN
The ATAN is used to return the arc tangent value of a given number. The results are often returned in the measures of Radian.
Syntax:
ATAN(number)
Example:
ATAN(180) = 1.565
ATAN2
The ATAN2 is used to return the arc tangent of two given numbers (x and y). The results are often returned in the measure of radians.
Syntax:
ATAN2(x-coordinate, y-coordinate)
Example:
ATAN2 (5,3) = 0.4
CEILING
The CEILING is used to round up float or double values.
Syntax:
CEILING(Numerical Value)
Example:
CEILING(2.24) = 3
COS
The COS is used to find the COSINE value of a given angle. The result is given in the form of Radians.
Syntax:
COS(Angle Value)
Example:
COS(PI()/4 = 0.707)
COT
The COT is used to return the COTANGENT Value of the given angle.
Syntax:
COT(Angle Value)
Example:
COT(PI( ) /4) = 1
DEGREES
The DEGREES is used to find out the value of Radians in their Degrees.
Syntax:
DEGREES (Radian Value)
Example:
DEGREES(PI( )/4) = 45.0
DIV
The DIV is used to return the integer part of a division operation, in which the first integer is divided by the second integer.
Syntax:
DIV (First Integer, Second Integer)
Example:
DIV(20,2) = 10
EXP
The EXP is used to find the exponential value of the given number.
Syntax:
EXP(Numerical Value)
Example:
EXP(2) = 7.389
FLOOR
The FLOOR is used to round a number to the nearest integer of equal or lesser value.
Syntax:
FLOOR(Numerical Value)
Example:
FLOOR(2.234) = 2
SQUARE
The SQUARE is used to find out the SQUARE of the given numerical value.
Syntax:
SQUARE(Numerical Value)
Example:
SQUARE(6) = 36
ZN
The ZN is used for returning the expression if it is not null. Otherwise, it returns zero. Use this function to use zero values in place of null.
Syntax:
ZN(expression)
Example:
ZN(SUM(Sales)) = 23,95,894
String Functions
Used to manipulate the character type data in Tableau software.
LOWER
Used to return the given upper case string in the lower case.
Syntax:
LOWER(string)
Example:
LOWER(TABLEAU) = tableau
UPPER
Used to return the given lowercase string in the uppercase.
Syntax:
UPPER(string)
Example:
UPPER(tableau) = TABLEAU
ASCII
Used to return the ASCII code for the first character in the String.
Syntax:
ASCII(String Value)
Example:
ASCII(‘A’) = 65
CHAR
Used to return the character when an ASCII value is passed.
Syntax:
CHAR(ASCII Value)
Example:
CHAR(65) = ‘A’
CONTAINS
Used to find if a certain substring is present in the String.
Syntax:
CONTAINS(String Value)
Example:
CONTAINS(SIMPLILEARN, LEARN)
ENDSWITH
Used to return a true if the given String ends with the specified substring.
Syntax:
ENDSWITH(string, substring)
Example:
ENDSWITH(“Simplilearn”, “earn”) = true
FIND
Returns the index position of the substring in a string or null if it is not found. If a start argument is provided, the function disregards any substring occurrences before the specified index position. The first character in the string is considered to be at index 1.
Syntax:
FIND(string, substring, [start])
Example:
FIND(“ABCD”, “CD”) = 2
LEFT
Used to return the left-most number of characters in the String.
Syntax:
LEFT(String, number)
Example:
LEFT(“Simplilearn”, 5) = “Simpli”
RIGHT
Used to return the right-most number of characters in the String.
Syntax:
RIGHT(String, number)
Example:
RIGHT(“Simplilearn”, ) = “learn”
LEN
Implemented to return the length of the given String.
Syntax:
LEN(String Value)
Example:
LEN(“Simplilearn”) = 11
TRIM
Used to return the string with leading and trailing spaces removed.
Syntax:
TRIM(String)
Example:
TRIM(” Simplilearn “) = “Simplilearn”
LTRIM
Used to return the String after removing any leading spaces.
Syntax:
LTRIM(String)
Example:
LTRIM(“ Simplilearn ”) = “Simplilearn”
MAX
Implemented to return the maximum of a and b.
Syntax:
MAX(a,b)
Example:
MAX (“abc”,”pqrs”) = “pqrs”
MID
The MID is used to return the String starting at the starting position. The initial character in the string is position 1. If another argument length is included, the returned String includes only that number of characters.
Syntax:
(MID(string, start, [length])
Example:
MID(“Simplilearn”, 6) = “learn”
REPLACE
Used to search the String for the substring and replace it with the replacement string.
Syntax:
REPLACE(string, substring, replacement)
Example:
REPLACE(“Java 8”, “8”, “13”) = “Java 13”
RTRIM
Used to return a string with any trailing spaces removed.
Syntax:
RTRIM(string)
Example:
RTRIM(” Tableau “) = ” Tableau”
SPACE
Used to return a string composed of the specified number of repeated spaces.
Syntax:
SPACE(Number)
Example:
SPACE() = ” “
SPLIT
Implemented to return a substring from a string, using a delimiter character to break the string into a tokens sequence.
Syntax:
SPLIT(String, delimiter, token number)
Example:
SPLIT (‘a-b-c-d’, ‘-‘, 4) = ‘c
RETURNSWITH
Used to return true if the String starts with a substring.
Syntax:
STARTSWITH(string, substring)
Example:
STARTSWITH(“Simplilearn”, “Si”) = true
User Functions
The USER function in Tableau handles real-time USER-related details and methods.
USERNAME
Used to return the name of the current user.
Syntax:
USERNAME( )
Example:
[Manager]=USERNAME( )
ISUSERNAME
Used to return true if the current user’s username matches the specified username or false if it does not match.
Syntax:
ISUSERNAME(String)
Example:
ISUSERNAME(“Harry”)
ISMEMBEROF
Used to return true if the person currently using Tableau is a group member that matches the given String.
Syntax:
ISMEMBEROF(String)
Example:
IF ISMEMBEROF(‘domain.lan\Annual_Sales’) THEN “Annual_Sales” ELSE “Other” END
USERDOMAIN
Used to return the current user’s domain when the user is signed on to Tableau Server.
Syntax:
USERDOMAIN()
Example:
[Manager]=USERNAME() AND [Domain]=USERDOMAIN()
FULLNAME
Used to return the full name of the current user.
Syntax:
FULLNAME( )
Example:
[Manager]=FULLNAME( )
ISFULLNAME
Used to return true if the present user’s name gets a match to the specified full name or false if it does not match.
Syntax:
ISFULLNAME(String)
Example:
ISFULLNAME(“Charles”)
Logical Functions
The Logical operations on the Data in Tableau are handled by the Logical Functions.
IF
Implemented to test a series of expressions returning the <then> value for the first true <expr>.
Syntax:
IF <expr> THEN <then> [ELSEIF <expr2> THEN <then2> statement ] [ELSE <else>] END
ELSE
Used to test a series of expressions returning the <then> value for the first true <expr>.
Syntax:
IF <expr> THEN <then> ELSE <else> END
ELSEIF
Used to test a series of expressions returning the <then> value for the first true <expr>. The Syntax for the ELSEIF function is shown below.
Syntax:
IF <expr> THEN <then> [ELSEIF <expr2> THEN <then2>…] [ELSE <else>] END
CASE
Used to perform logical tests and return appropriate values. The CASE function evaluates an expression, compares it to a sequence of values, value1, value2, etc., and returns a result.
Syntax:
CASE <expression> WHEN <value1> THEN <return1> WHEN <value2> THEN <return2> … ELSE <default return> END
AND
Used to perform logical conjunction between two expressions.
Syntax:
IF <expr1> AND <expr2> THEN <then> END
OR
Used to perform a disjunction operation between two expressions.
Syntax:
IF <expr1> OR <expr2> THEN <then> END
NOT
Used to find the logical negation of a given expression.
Syntax:
IF NOT <expr> THEN <then> END
THEN
Used to test a series of expressions returning the <then> value for the first true <expr>.
Syntax:
IF <expre> THEN <then> [ELSEIF ,expr2> THEN <then2>…] [ELSE <else>] END
WHEN
Used to find the first <value> that matches <expr> and returns the corresponding <return>.
Syntax:
CASE <expr> WHEN <Value1> THEN <return1> … [ELSE <else>] END
END
Used to test a series of expressions returning the <then> value for the first true <expr>. Must be placed at the end of an expression.
Syntax:
IF <expr> THEN <then> [ELSEIF <expr2> THEN <then2>…] [ELSE <else>] END
Aggregate Functions
The Mathematical computations in Tableau are handled by Aggregate Functions.
VAR
Used to return all values’ statistical variances in the given expression based on a population sample.
Syntax:
VAR(expression)
VARP
Used to return all values’ statistical variance in the entire population’s given expression.
Syntax:
VARP(expression)
SUM
Implemented to return the sum of all values in the expression. The numeric fields use the SUM function by ignoring the Null values.
Syntax:
SUM(Expression)
STDEV
Used to return the statistical standard deviation of all values in the given expression based on a population sample.
Syntax:
STDEV(expression)
STDEVP
Used to return the statistical standard deviation of all values in the given expression based on a biased population.
Syntax:
STDEVP(expression)
PERCENTILE
Used to return the percentile value from the given expression corresponding to the specified number.
Syntax:
PERCENTILE(expression, number)
MIN
Implemented to return the minimum of an expression across all records.
Syntax:
MIN(expression)
MEDIAN
Implemented to return the median of an expression across all records.
Syntax:
MEDIAN(Expression)
MAX
Implemented to return the maximum of an expression across all records.
Syntax:
MAX(EXPRESSION)
COVARP
Used to return the population covariance of two expressions.
Syntax:
COVARP(expression 1, expression2)
COUNT
Implemented to return the number of items in a group. Null values are not ignored.
Syntax:
COUNT(Expression)
COUNTD
Used to return the number of distinct items in a group.
Syntax:
COUNTD(expression)
CORR
Used to return the Pearson correlation coefficient of two expressions.
Syntax:
CORR(expression a, expression b)
COLLECT
Used to combine the values in the argument field and ignore the Null values.
Syntax:
COLLECT (spatial)
AVG
Implemented to return the average of all the values in the expression.
Syntax:
AVG(Expression)
ATTR
Used to return the expression’s value if it has a single value for all rows.
Syntax:
ATTR(expression)