Power Fx function
IfError — Power Fx function reference
Catch and replace an error.
Syntax
powerfx
IfError( Value1 [, FallbackResult1 ] [, Value2, FallbackResult2, ... ] [, DefaultFallback ] )
Examples
powerfx
IfError(Value(txtQty.Text), 0)
→ Safe fallback
powerfx
IfError(1 / Value(txtDivisor.Text), 0)
powerfx
IfError(ParseJSON(txtPayload.Text), Blank())
Common mistakes & gotchas
- IfError only catches errors, not blanks — a formula that legitimately returns blank still returns blank rather than falling through to the fallback.
- Multiple value/fallback pairs can be chained to try several formulas in sequence, similar to a try/catch chain, with a final default if all of them error.
Related Power Fx functions
From Conditional logic