# Creating Key Figures – Mathematical Operators

Hello! ð

I’m creating some blog posts to show you how to better use your key figures functionalities and then you will be able to apply them according to your business needs.

This blog post aims to explain you a little better about the existent Mathematical Operators within your system.

If you want to check another available operators, please check the blog posts below:

### Mathematical Operators in your system

• ABS
• SIGN
• CEIL
• DIV
• EXP
• FLOOR
• LOG
• LOG10
• MAX
• MAX0
• MIN
• MIN0
• MOD
• SQRT
• TRUNC

Iâm going to provide with a practical example on the operators. Please consider the formulas used and change their values as below:

ValueOrKeyFigure1 =Â Confirmed Quantity

ValueOrKeyFigure2Â =Â Ordered Quantity

After the explanation of each Mathematical Operator, you will find a table with example of possible results based on the provided values and formulas.

#### ABS

Itâs a mathematical operator that brings the absolute value of a number. It will show you the distance of a number on the line from zero and it will not considerate if the value is negative, i.e., if you have a key figure with the value -246, its absolute value will be 246. It means that the same value will be shown, but without its sign

Example: ABS(âValueOrKeyFigure1â)

#### SIGN

It returns the sign of a number. If the value is positive, its result will be 1. If the value is negative, the result will be -1 and, if a value is zero, the result will be zero.

Example: SIGN(âValueOrKeyFigure1â)

#### CEIL

Itâs a mathematical operator that will analyze the given value/key figure and bring the next integer number. It means that if a value is 2,5, its ceil is 3.

Example:Â  CEIL(âValueOrKeyFigure1â)

#### DIV

It will divide two values or key figures.

Example: DIV(âValueOrKeyFigure1â,âValueOrKeyFigure2â)

#### EXP

It returns the exponential value (with base 2,71828183) raised to the power of the given value or key figure. The number 2,71828183 is a constant value and the base of the natural logarithm. So if we have the number 2, its exponential result will be 7,38905610.

Example: EXP(âValueOrKeyFigure1â)

#### FLOOR

Itâs a mathematical operator that will analyze the given value/key figure and bring the nearest smallest integer number. It means that if a value is 2,5, its floor is 2

Example: FLOOR(âValueOrKeyFigure1â)

### LOG

It is the inverse of the EXP function, just like division and multiplication. Its base is also 2,71828183. If our value is 2, the logarithm will be 0,693.

Example: LOG(âValueOrKeyFigure1â)

### LOG10

Itâs a mathematical operator that returns the base 10 logarithm of a number.

Example: LOG10 (âValueOrKeyFigure1â)

### MAX

Max compares two values and brings up the greatest value

Example: MAX(âValueOrKeyFigure1â, âValueOrKeyFigure2â)

### MAX0

If the value is negative, then the number will be changed to zero. Positive values will remain the same.

Example: MAX(âValueOrKeyFigure1â)

### MIN

Max compares two values and brings up the smallest value.

Example: MIN(âValueOrKeyFigure1â, âValueOrKeyFigure2â)

### MIN0

If the value is positive, then the number will be changed to zero. Negative values will remain the same.

Example: MIN0(âValueOrKeyFigure1â)

### MOD

MOD is a division operator, and its the answer is the remainder of an integer division operation, rather than a decimal result.

Example: MOD(âValueOrKeyFigure1â, âValueOrKeyFigure2â)

#### SQRT

Returns the square root of a positive value

Example: SQRT(âValueOrKeyFigure1â)

#### TRUNC

It truncates the number to an integer by removing its decimal or fractional part.

Example: TRUNC(âValueOrKeyFigure1â)

### Table with examples for Mathematical Operators

I hope you all have been able to understand a bit more on Mathematical Operators. If you have any doubt, please do not hesitate on commenting them below. ?