Mathematical Functions

You can use mathematical functions in custom tables and fields. See Adding a Custom Table and Editing Field Formulas for further details. Below are explanations of available mathematical functions.

ACOS(number)

Returns the angle, in radians, whose cosine is the given number. Also referred to as arccosine.

ASIN(number)

Returns the angle, in radians, whose sine is a given number. Also referred to as arcsine.

ATAN(number)

Returns the angle in radians whose tangent is a given number. Also referred to as arctangent.

CEILING(number)

Returns the smallest integer that is greater than, or equal to, the a given number.

COS(number)

Returns the trigonometric cosine of a given angle, in radians.

COSH(number)

Returns the hyperbolic cosine of a given number.

COT(number)

Returns the cotangent of a given number.

DIV(number1, number2)

Returns the number of times number2 fits completely in number1.

EXP(number)

Returns the exponential value of a given number.

FLOOR(number)

Returns the largest integer less than or equal to the given numeric expression.

ISINFINITY(number)

Returns -1 if the number evaluates to negative infinity, 1 if it evaluates to positive infinity, and 0 otherwise.

ISINTEGER(number)

Returns whether a given number is a whole number.

LOG(number)

Returns the natural logarithm of a given number.

LOG10(number)

Returns the base-10 logarithm of the given float expression

MAXVAL(number1,number2)

Returns the highest of two numbers.

MINVAL(number1,number2)

Returns the smallest of two numbers.

MOD(number1,number2)

Returns the remainder of dividing number1 by number2 (modulo).

PI()

Returns the constant value of the mathematical PI.

POWER(number1,number2)

Returns the value of the given number raised to a specified power.

RAND()

Returns a random number between 0 and 32767

RANK()

Returns the rank (i.e. row number) of the current record in a table.

RANKASC(order_by_field)

Returns the row number ordered by given field in ascending manner.

Example: (3, 5, 5, 19) is ranked in ascending order (1, 2, 3, 4).

You can also sort by multiple columns:

RANKASC([partitionA],[paritionB]…[partitionN],[orderByField])

Example: RANKASC([EmployeeID],[CategoryID],[Quantity])

RankCompetitionAsc(partition fields list, order field)

Returns the rank of each row within the partition of a result set. The rank of a row is one plus the number of ranks that come before the current row ordered by the rightmost field parameter in ascending order.

Leftmost field parameters (optional) define the partitions in which each ordering starts.

Example: (3, 5, 5, 19) is ranked in ascending order (1, 2, 2, 4).

RankCompetitionDesc(partition fields list, order field)

Returns the rank of each row within the partition of a result set. The rank of a row is one plus the number of ranks that come before the current row ordered by the rightmost field parameter in descending order.

Leftmost field parameters (optional) define the partitions in which each ordering starts.

Example: (3, 5, 5, 19) is ranked in descending order (4, 2, 2, 1).

RankDenseAsc(partition fields list, order field)

Returns the dense rank of rows within the partition of a result set without any gaps in the ranking. The rank of a row is one plus the number of distinct ranks that come before the current row ordered by the rightmost field parameter in ascending order.

Leftmost field parameters (optional) define the partitions in which each ordering starts.

Example: (3, 5, 5, 19) is ranked in ascending order (1, 2, 2, 3).

RankDenseDesc(partition fields list, order field)

Returns the dense rank of rows within the partition of a result set without any gaps in the ranking. The rank of a row is one plus the number of distinct ranks that come before the current row ordered by the rightmost field parameter in descending order.

Leftmost field parameters (optional) define the partitions in which each ordering starts.

Example: (3, 5, 5, 19) is ranked in descending order (3, 2, 2, 1)

RANKDESC(order_by_field)

Returns the row number ordered by given field in descending manner.

Example: (3, 5, 5, 19) is ranked in ascending order (4, 3, 2, 1).

You can also sort by multiple columns:

RANKDESC([partitionA],[paritionB]…[partitionN],[orderByField])
Example: RANKDESC([EmployeeID],[CategoryID],[Quantity])

ROUND(number,precision)

Returns the given number, rounded to a specified precision.

SIN(number)

Returns the trigonometric sine of a given angle, in radians.

SINH(number)

Returns the hyperbolic sine of a given number.

SQRT(number)

Returns the square root of a given number.

TAN(number)

Returns the tangent of a given number.

TANH(number)

Returns the hyperbolic tan of a given number.

TOBIGINT(string)

Converts a string representing a valid BigInt value to BigInt type.

TODOUBLE(string)

Converts a string representing a valid double value to Double type.

TOINT(string)

Converts a string representing a valid Int value to Int type.

.r.