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:
- Boolean Operators: https://blogs.sap.com/2019/04/12/creating-key-figures-boolean-operators/#
- Data Operators: https://blogs.sap.com/2019/04/24/creating-key-figures-data-operators/
- Trigonometric Operators: https://blogs.sap.com/2019/04/24/creating-key-figures-trigonometric-operators/
Mathematical Operators in your system
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.
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
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.
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.
It will divide two values or key figures.
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.
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
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.
It’s a mathematical operator that returns the base 10 logarithm of a number.
Example: LOG10 (“ValueOrKeyFigure1”)
Max compares two values and brings up the greatest value
Example: MAX(“ValueOrKeyFigure1”, “ValueOrKeyFigure2”)
If the value is negative, then the number will be changed to zero. Positive values will remain the same.
Max compares two values and brings up the smallest value.
Example: MIN(“ValueOrKeyFigure1”, “ValueOrKeyFigure2”)
If the value is positive, then the number will be changed to zero. Negative values will remain the same.
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”)
Returns the square root of a positive value
It truncates the number to an integer by removing its decimal or fractional part.
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. 🙂