OpenBI Docs Buy

ISERROR

Whether an expression gives an error (an infinite number counts as one).

Group: Logical. Compatible with DAX.

Syntax

ISERROR ( <value> )
ParameterTypeDescription
valueValueThe expression to test.

Returns

Boolean. TRUE when the expression fails, FALSE when it gives a value.

Remarks

  • Infinity and NaN, from a division by zero, count as errors.
  • A blank is a value, not an error; so is the blank DIVIDE gives for a division by zero.
  • IF ( ISERROR ( x ), y, x ) is IFERROR ( x, y ) written out.

Examples

What counts as an error

EVALUATE
ROW (
    "1 / 0", ISERROR ( 1 / 0 ),
    "DIVIDE ( 1, 0 )", ISERROR ( DIVIDE ( 1, 0 ) ),
    "Text as a number", ISERROR ( VALUE ( "abc" ) ),
    "Blank", ISERROR ( BLANK () )
)
1 / 0DIVIDE ( 1, 0 )Text as a numberBlank
TRUEFALSETRUEFALSE

Codes that are not numbers

EVALUATE
VAR Codes = DATATABLE ( "Code", STRING, { { "12" }, { "40" }, { "n/a" } } )
RETURN
    ADDCOLUMNS ( Codes, "Not a number", ISERROR ( VALUE ( [Code] ) ) )
CodeNot a number
12FALSE
40FALSE
n/aTRUE

IFERROR, ERROR, ISBLANK, DIVIDE.

Last updated · OpenBI Studio 0.3.74