Number Functions in Tableau: Mathematical, Trigonometric

Number Functions in Tableau: Mathematical, Trigonometric

3 mins read480 Views Comment
Updated on Apr 10, 2022 21:30 IST

In this article, we will discuss number functions in tableau like mathematical and trigonometric function.

2022_04_NUMBER-FUNCTION-IN-TABLEAU.jpg

In this article, we will discuss different number functions in Tableau.

Tableau support many types of function for used in Tableau calculation like Number, String, Date, Type conversion, Logical,  Aggregate, User, Spatial, Predictive modelling, additional, format() function etc.

Recommended online courses

Best-suited Tableau courses for you

Learn Tableau with these high-rated online courses

Free
3 hours
Free
21 hours
Free
5 hours
Free
– / –
39.54 K
2 hours
– / –
– / –
Free
19 hours
8.4 K
3 weeks
Free
2 hours
– / –
– / –

Number Function in Tableau

Number functions are used to perform calculation on the filed in any given dataset. These are only used with the numeric fields.

Mathematical Function

  • ABS
    • Returns the absolute value of the given number
    • Syntax: ABS (number)
    • Eg: ABS (5) = ABS (-5) = 5
  • CEILING
    • Returns the least integer greater than or equal to the given number
    • Syntax: CEILING (number)
    • Eg:
      •  CEILING (4.157) = 5
      • CEILING (-4.157) = -4
  • FLOOR
    • Returns the greates integer less than or equal to the given number
    • Syntax: FLOOR (number)
    • Eg:
      •  FLOOR (4.157) = 4
      • FLOOR (-4.157) = -5
  • DIV
    • Returns the integer part (quotient) of a division operation, in which integer1 is divided by integer2.
    • Syntax: DIV (int 1, int 2)
    • Eg: DIV(9, 5) = 1
  • EXP
    • Returns e (expotential) raised to the power of a given number
    • Syntax: EXP (number)
    • Eg: EXP (5) = 13.59
  • LN
    • Returns natural logarithm of a given number and null if the value is less than or equal to zero
    • Syntax: LN (number)
    • Eg: LN(5) = 1.609
  • LOG
    • Return the logarithm of a number for the given base, if the base is not given base 10 is used.
    • Syntax: LOG (number, [base])
    • Eg: LOG ( 5, 10) = 0.6989
  • MAX
    • Returns the maximum of two arguments, which must be of same data type and returns null if either of the argument is null
    • Syntax: MAX(number , number)
    • Eg: MAX(5, 10) = 10
  • MIN
    • Returns the minimum of two arguments, which must be of same data type and returns null if either of the argument is null
    • Syntax: MIN(number , number)
    • Eg: MIN(5, 10) = 5
  • POWER
    • Raised the number to the specified power
    • Syntax: POWER (number, power)
    • Eg: POWER(6, 2)  = 36
  • ROUND
    • Returns the number to the specified number of digits. Decimal arguments psecifies how many decimal point of precision to include.
    • Syntax: ROUND (number, [decimals])
    • Round (3.149745, 2) = 3.15
  • SIGN
    • This is called signum functions and it returns:
      • -1 if numbers are negative
      • 0 if the number is zero
      • 1 if the number is positive
    • Syntax: SIGN (number)
    • Eg: SIGN (-4.354) = -1
  • SQRT
    • Returns the square root of a number
    • Syntax: SQRT(number)
    • Eg: SQRT(36) = 6
  • SQUARE
    • Returns the square of a number
    • Syntax: SQUARE(number)
    • Eg: SQUARE (6) = 36

Trigonometric Functions:

  • PI
    • Returns the numeric constant pi: 3.1415
  • DEGREES
    • Converts a given number in radian to degree
    • Syntax: DEGREES (number)
    • Eg: DEGREES (PI()/3) = 60.0
  • RADIAN
    • Convert a given number from degree to radian
    • Syntax: RADIAN (number)
    • Eg: RADIAN (180) = 3.1415
  • SIN
    • Returns the sine of an angle
    • Syntax: SIN (number)
    • Eg: SIN ( 30) = ½ =0.5
  • ASIN
    • Returns the arc sin(inverse) of a given number
    • Syntax: ASIN (number)
    • Eg: ASIN(1) = 90 = PI()/2
  • COS
    • Returns the cosine of an angle
    • Syntax: COS (number)
    • Eg: COS ( 60) = ½ =0.5
  • ACOS
    • Returns the arc cosine (inverse) of a given number
    • Syntax: ACOS (number)
    • Eg: ACOS(1) = 0 
  • TAN
    • Returns the tangent of an angle
    • Syntax: TAN (number)
    • Eg: TAN ( 45) =1
  • ATAN
    • Returns the arc tangent (inverse) of a given number
    • Syntax: ATAN (number)
    • Eg: ATAN(180) = 1.56 

Conclusion

In this article, we have discussed number functions in Tableau like arithmetic and trigonometry

Hope this article will help you in your data analyst journey.

This article is a part of a complete tutorial of Tableau, focusing on Tableau certified data analysts and tableau desktop specialists. 

Through a series of articles, we will cover all the topics in-depth with examples.

Tableau Operators: Arithmetic, Comparison and Logical
Tableau Operators: Arithmetic, Comparison and Logical
In this article we will discuss different operators in Tableau like arithmetic, comparison and logical operators.
Data Types in Tableau
Data Types in Tableau
Tableau supports 7 types of data types String values, Date values, Date & Time values, Numeric values, Boolean values, Geographical values, Cluster or mixed values. Tableau supports 7 types of...read more
Data Aggregation in Tableau
Data Aggregation in Tableau
In this article, we discussed different aggregation functions in tableau, how to change the aggregation of a measure in a view and how to disaggregate the data. In this article,...read more
About the Author