ABS
The ABS function returns the absolute value of a number (i.e) a number without its sign.
Syntax
ABS(value) - > number
Arguments
Arguments | Datatype | Description |
---|---|---|
value | Number/Node reference | The node or the number for which you want the absolute of. |
Example
In the below table, data of demand and inventory are given. Consider a scenario where you want to calculate the absolute difference between demand and inventory.
Parameter | Week 1 | Week 2 | Week 3 | Week 4 | Week 5 |
---|---|---|---|---|---|
Demand | 110 | 95 | 75 | 78 | 0 |
Inventory | 85 | 70 | 100 | 80 | 25 |
To achieve this, the following formula should be written in the [Absolute Difference] node:
ABS
(
[Demand]
-
[Inventory]
)
Result
Absolute Difference | 25 | 25 | 25 | 2 | 25 |
Note
If ABS is not used the difference between values will be as follows:
Absolute Difference | 25 | 25 | -25 | -2 | -25 |
Last updated