Tableau Number Function (Calculated Fields) – 3 Types of Functions

We offer you a brighter future with industry-ready online courses - Start Now!!

1. Tableau Number Function – Objective

In this Tableau Functions tutorial, we are going to study Tableau Number Function in Calculated Fields, Different types of Number function in Tableau: Mathematics functions, Trigonometric function, and Statistical function. Some Tableau functions we will discuss here like, Tableau round function, Tableau ZN function, Tableau power function with some Tableau rounding issue. We will also study Tableau Calculated Fields examples to understand well.

So, let us start the Tableau Number Function.

Tableau Number function

Tableau Number Function (Calculated Fields)

2. What is Tableau Number Function?

Number function in Tableau enables you to perform calculations on the information esteems in your fields. Tableau Number function must be utilized with fields that contain numerical esteems.

For instance, you may have a field that contains esteems for the fluctuation in your financial plan, titled Budget Variance. One of those qualities may be – 7. You can utilize the ABS capacity to restore the outright estimation of that number, and the various numbers in that field.

Let’s study Tableau Aggregate Functions with Examples

3. Types of Number Function in Tableau Calculated Fields

There are three head Tableau Number Functions are available in Calculated Fields:

  • Mathematics Number Function
  • Trigonometric Number Function
  • Statistical Number Function

a. Mathematics Functions

This is the first Tableau Number Function, let’s discuss its sub types.

Tableau Number Function - Mathematics Functions

Tableau Number Function – Mathematics Functions

i.  Absolute Function

ABS(number)

Tableau ABS function returns the absolute value of the number. Example:

ABS([SalesVsGoal]) = 100

ii. DEGREES Function

DEGREES(number)

Tableau Degree function converts the number or field from radians to degrees. For example:

DEGREES(PI( )/4) = 45.00

Read about Tableau Date Functions with Examples

iii. EXP Function

EXP(number)

The number e is the base of the natural logarithm. Tableau EXP function returns e raised to the power of the number, i.e. e^5 would be expressed as:

EXP(5) = 148.44

iv. LN Function

LN(number)

Tableau LN function returns the natural log of the number. If the number is less than or equal to zero, it will return NULL. Example:

LN(5) = 1.61

v. LOG Function

LOG(number,[base])

Tableau LOG Function returns the log of the number for the given base. If no base is provided, it will use base 10 by default. Example:

LOG(5,[2]) = 2.32

vi. PI Function

PI()

Tableau PI Function returns the numeric constant of pi.

PI() = 3.14159

vii. POWER Function

POWER(number, function)

Tableau POWER function raises the number to the specified power. Example:
POWER(4,3) = 64

Let’s discuss String Functions in Tableau with examples

viii. RADIANS Function

RADIAN(number)

Tableau RADIANS Function converts the number from degrees to radians.

RADIANS(180) = 3.14159

ix. ROUND Function

ROUND(number,[decimals])

Tableau ROUND function rounds the number to the nearest integer or to a specified number of decimal places. Example:

ROUND([Profit], 2) = 7.62

x. SIGN Function

SIGN(number)

Tableau SIGN function returns the sign of a number. For positive numbers, the function returns a 1. For zero, it returns a 0. And for negative numbers, it returns a -1.

Example:

SIGN([Revenue]) = -1

xi. SQRT Function

SQRT(number)

Tableau SQRT function returns the square root of a number. Example:

SQRT (9)  =  3

xii. SQUARE Function

SQUARE(number)

Tableau SQUARE function returns the square of a number. Example:

SQUARE(9) = 81

xiii. ZN Function

ZN(expression)

Tableau ZN function evaluates the expression, and if it is NULL, then it will return a value of 0. Otherwise, the expression is returned as stated. Example:

ZN([Revenue]) = [Revenue]

Read about Logical Functions | Logic Statements in Tableau

b. Trigonometric Function

There are seven sub-types of Tableau Number Function:

Tableau Number Function - Trigonometric Functions

Tableau Number Function – Trigonometric Functions

i. SIN Function

SIN(number)

Tableau SIN function returns the sine of an angle. Specify the angle in radians.

Example:

SIN(0) = 0.70710

ii. COS Function

COS(number)

Tableau COS function returns the cosine of an angle. Specify the angle in radians.

Example:

COS(PI()/4) = 0.70710

iii. TAN Function

TAN(number)

Tableau TAN function returns the tangent of an angle. Specify the angle in radians.

Example:

TAN(PI()/4) = 1.0

Let’s revise Tableau Paged Workbook & Steps to Create it

iv. COT Function

COT(number)

Tableau COT function returns the cotangent of an angle. Specify the angle in radians.

Example:

COT(PI()/4) = 1

v. ASIN Function

ASIN(number)

Tableau ASIN function returns the arc sine of a number. The result is in radians.

Example:

ASIN(1) = 1.57079

vi. ACOS Function

ACOS(number)

Tableau ACOS function returns the arc cosine of a number. The result is in radians.

Example:

ACOS(-1) = 3.14159

vii. ATAN Function

ATAN(number)

Tableau ATAN function returns the arc tangent of a number. The result is in radians.

Example:

ATAN(180) = 1.56524

ATAN2 Function

ATAN2(y number, x number)

Tableau ATAN2 function returns the arc tangent of two given numbers. The result is in radians. Example:

ATAN2(2, 1) = 1.10714

Let’s look at Tableau Design Flow in Tableau Dashboard & Worksheet

c. Statistical Function

Here, we will discuss two types of Tableau Number Function:

Tableau Number Function - Statistical Functions

Tableau Number Function – Statistical Functions

i. MAX Function

MAX(number, number)

Tableau MAX function returns the maximum of a single expression across all records or the maximum of two expressions for each record. The two arguments must be the same type. This function will return a value of NULL if either argument is NULL.

Example:

MAX(4,7) = 7

Top 5 Tableau books to Learn Tableau Data Visualization

ii. MIN Function

MIN(number, number)

Similar to the MAX function, Tableau MIN function returns the minimum of a single expression across all records or the minimum of two expressions for each record. MIN returns a value of NULL if either of the two arguments is NULL. The two arguments must be of the same type. For example:

MIN(4,7) = 4

So, this was all about Tableau Number Function – Calculated Fields. Hope you like our explanation.

4. Conclusion

In this Tableau tutorial, we studied about Tableau Calculated Fields – Tableau Number Function, types of number function: Mathematics functions, Trigonometric function, and Statistical function with some Tableau functions- Tableau round function, Tableau ZN function, Tableau power function, and Tableau rounding issue. We will also study Tableau Calculated Fields examples. Furthermore, if you have doubt, feel free to ask in the comment section.

See Also- Tableau Show Me Menu- Part I & Tableau Data Types

For reference

Your opinion matters
Please write your valuable feedback about DataFlair on Google

courses

DataFlair Team

DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.

Leave a Reply

Your email address will not be published. Required fields are marked *