In Tableau, we can use number functions to manipulate, transform, and analyze our numerical data as per our analysis.
Here are some of the common number functions used in Tableau.
|
Function |
Syntax |
Description |
Example |
|
ABS |
ABS (number) |
Returns the absolute value of a given number. |
ABS (-20) = 20 |
|
SUM |
SUM (Number Field) |
Returns the sum of all values in the expression. Null values are ignored. |
SUM([Sales]) |
|
AVG |
SUM (number) |
Returns the average of all values in the expression. Null values are ignored. |
AVG([Sales]) |
|
MEDIAN |
MEDIAN(number) |
Returns the median of a single expression. Null values are ignored. |
MEDIAN([Sales]) |
|
MAX |
MAX(number) |
Returns the maximum value of the field (based on the filter and dimensions used in a visualization) and provides the highest value. |
If the [Profit] field contains values ranging from 6000 to 8000 MAX[Profit] = 8000 |
|
MIN |
MIN(number)
|
Returns the minimum value of the field (based on the filter and dimensions used in a visualization) and provides the lowest value. |
If the [Profit] field contains values ranging from 6000 to 8000 MIN[Profit] = 6000 |
|
ZN |
ZN(number) |
Returns zero if null and the number if not null. |
ZN(Null) = 0 or ZN(10) = 10 |
|
CEILING |
CEILING(number) |
Rounds a number to the nearest integer of equal or greater value. |
CEILING(3.14) = 4 |
|
FLOOR |
FLOOR(number) |
Rounds a number to the nearest integer of equal or lesser value. |
FLOOR(3.14) = 3 |
|
DIV |
DIV(Integer1, Integer2) |
Returns an integer value after diving Integer1 with Integer2. |
DIV(13/3) = 4 |
|
POWER |
POWER(number, power) |
Raises a number to a specified power. |
POWER(5, 2) = 25 |
|
ROUND |
ROUND(number, decimal) |
Rounds numbers to a specified number of digits. The decimal argument specifies how many decimal points of precision to include in the result. If the decimal is omitted, the number is rounded to the nearest integer. |
ROUND(3.15, 1) = 3.1 ROUND(3.15) = 3 |
|
SIGN |
SIGN(number) |
Returns a sign of a number. |
SIGN([Profit]) The possible return values for each row is. -1 if the profit is negative, 0 if the profit is zero and 1 if the profit is positive. |
|
SQRT |
SQRT(number) |
Returns a square root of a number |
SQRT(25) = 5 |
|
SQUARE |
SQUARE(number) |
Returns the square of a number |
SQUARE(4) = 16 |

