Nz
|
Miscellaneous functions |
SYNTAX | Nz( x, valueifnull = 0 ) |
RETURNS | NUMBER, ARRAY |
FUNCTION | Converts Null/Nan/Infinity values to zero (or user defined value) x can be number or array. You can use the Nz function to return zero, or another specified value when argument x is Null or Nan or Infinite. For example, you can use this function to convert a Null (empty) value to another value and prevent it from propagating through an expression. If the optional valueifnull argument is included, then the Nz function will return the value specified by that argument if the x argument is Null (or Nan or Infinity). Since AmiBroker 6.90 valueifnull argument can be an array. |
EXAMPLE | You can use the Nz function as an alternative to the IIf function.
Instead of:
You can write:
|
SEE ALSO |
The Nz function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.