Table of contents
Collapse the table of content
Expand the table of content

IFERROR Function (DAX)

Owen Duncan|Last Updated: 10/5/2018
1 Contributor

Evaluates an expression and returns a specified value if the expression returns an error; otherwise returns the value of the expression itself.


IFERROR(value, value_if_error)  


valueAny value or expression.
value_if_errorAny value or expression.

Return Value

A scalar of the same type as value


You can use the IFERROR function to trap and handle errors in an expression.

If value or value_if_error is an empty cell, IFERROR treats it as an empty string value ("").

The IFERROR function is based on the IF function, and uses the same error messages, but has fewer arguments. The relationship between the IFERROR function and the IF function as follows:


Note that the values that are returned for A and B must be of the same data type; therefore, the column or expression used for value and the value returned for value_if_error must be the same data type.


The following example returns 9999 if the expression 25/0 evaluates to an error. If the expression returns a value other than error, that value is passed to the invoking expression.


See Also

Logical Functions (DAX)

© 2018 Microsoft