Wyn Enterprise User Guide

Math Functions

Mathematical functions are very similar to Excel's mathematical functions, which are used to perform basic math functionality on your data. For example, you can use mathematical functions to find the square root, round, absolute value, and so on.

Following is the list of math functions supported in Wyn Enterprise:

ABS


Description

The ABS function returns the absolute value of a number.

Syntax

ABS(<number>)

Parameters

Parameter Description
number The number for which you want the absolute value.

Return Value

A decimal.

Example

ABS('Sale'[Price])

DIVIDE


Description

The DIVIDE function performs division and returns the alternate result on division by 0.

Syntax

DIVIDE(<numerator>, <denominator>)

Parameters

Parameter Description
numerator The dividend or number to divide.
denominator The divisor or number to divide by.

Return Value

A decimal.

Example

DIVIDE(sum('Sale'[Amount]), Sum('Sale'[Price]))

MOD


Description

The MOD function returns the remainder after a number is divided by a divisor. The result always has the same sign as the divisor.

Syntax

MOD(<number>, <divisor>)

Parameters

Parameter Description
number The number for which you want to find the remainder after the division is performed.
divisor The number by which you want to divide.

Return Value

A whole number.

Example

MOD('Sale'[Price], 3)

POWER


Description

The POWER function returns the result of a number raised to a power.

Syntax

POWER(<number>, <power>)

Parameters

Parameter Description
number The base number, which can be any real number.
power The exponent to which the base number is raised.

Return Value

A decimal.

Example

POWER(11, 2)

ROUND


Description

The ROUND function rounds a number to the specified number of digits.

Syntax

ROUND(<number>, <num_digits>)

Parameters

Parameter Description
number The number you want to round.
num_digits The number of digits to which you want to round. A negative value rounds digits to the left of the decimal point; a value of zero rounds to the nearest integer.

Return Value

A decimal.

Example

ROUND(3.33333, 2)

SQRT


Description

The SQRT function returns the square root of a number.

Syntax

SQRT(<number>)

Parameters

Parameter Description
number The number for which you want the square root, a column that contains numbers, or an expression that evaluates to a number.

Return Value

A decimal.

Example

SQRT(2)

TRUNC


Description

The TRUNC function truncates a number to an integer by removing the decimal, or fractional, part of the number.

Syntax

TRUNC(<number>,<num_digits>)

Parameters

Parameter Description
number The number you want to truncate.
num_digits A number specifying the precision of the truncation; if omitted, 0 (zero).

Return Value

A whole number.

Example

TRUNC(1.32,1)