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. For Boolean Operators, please refer to: https://blogs.sap.com/2019/04/12/creating-key-figures-boolean-operators/#

### 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. ð