IFNAN
Last updated
Last updated
The IFNAN function checks for error and returns the default value if the value in the node is an error.
IFNAN(value1, value2?: number) - > number
Arguments | Data type | Description |
---|---|---|
value2 in the place of Error.
Consider the nodes Total Cost and No. of units to have the periods values as shown below:
Now, Cost per unit is calculated by dividing the Total Cost by No. of units. If IFNAN is not applied, the result would be as follows due to 'divide by zero' error:
The error is to be replaced with 0. To achieve this, the following formula should be written in the [Cost Per Unit] node:
IFNAN
(
[Total Cost]
/
[No. of units]
,0)
value1
Number,Node reference
The node that is to be checked for error values.
value2?: number
Number,Node reference
The value that should replace the errors. The value should be of numerical datatype only.