DAX Function Guide

ERROR
Empty image or helper icon

Sam McKay

CEO & Founder

How does the ERROR work?
The ERROR function (DAX) raises an error with an error message.
ERROR Formula Syntax

ERROR(
     <text>
)

How do you use the ERROR?

The ERROR function can be used to stop the execution of the calculation. 

Related Blog Posts

Loading

Considerations when using the ERROR?

If Excel detects that your Excel Formula or Function contains an error, it will return an error message (e.g. #VALUE!, #N/A).

The error message that you are presented with, provides information about the type and cause of the Excel formula error. It can therefore assist you with identifying and fixing the problem.

Related Video Tutorials

Loading

Formula examples using the ERROR

MEASURE DimProduct[Measure] = IF( SELECTEDVALUE(DimProduct[Color]) = “Red”, ERROR(“red color encountered”), SELECTEDVALUE(DimProduct[Color]) )

= IF( SELECTEDVALUE(DimProduct[Color]) = “Magenta”, ERROR(“magenta color encountered”), SELECTEDVALUE(DimProduct[Color]) )

=ERROR.TYPE(B3)

Related Courses

Loading