# ISERROR

## What is the ISERROR Function?

The ISERROR function is a DAX function that checks whether an expression returns an error. It returns a boolean value of TRUE if the expression returns an error, and FALSE if it does not. The syntax for the ISERROR function is as follows:

ISERROR(❰expression❱)

``` How to Use the ISERROR Function? The ISERROR function can be used in a variety of ways to handle errors in your Power BI data. Here are some examples: Example 1: Checking for Errors in a Calculation Suppose you have a calculation that divides one column by another, but some of the values in the denominator column are zero. This will result in a division by zero error. To check for this error, you can use the ISERROR function in conjunction with the DIVIDE function, as follows: ```

IF(

ISERROR(DIVIDE(❰numerator❱, ❰denominator❱)),

BLANK(),

DIVIDE(❰numerator❱, ❰denominator❱)

)

``` This formula checks whether the DIVIDE function returns an error, and if so, returns a blank value. If the DIVIDE function does not return an error, it returns the result of the calculation. Example 2: Handling Missing Data Sometimes your data may have missing values, which can cause errors in your calculations. To handle this, you can use the ISERROR function in conjunction with the IF function to replace missing values with a default value. For example: ```

IF(

ISERROR(❰column❱),

❰default value❱,

❰column❱

)

``` This formula checks whether the column contains an error, and if so, replaces the error with a default value. If the column does not contain an error, it returns the original value. Example 3: Filtering Out Errors If you have a table that contains errors, you may want to filter them out to avoid displaying incorrect data. To do this, you can use the FILTER function in conjunction with the ISERROR function, as follows: ```

FILTER(

❰table❱,

NOT(ISERROR(❰column❱))

)

``` This formula filters out any rows in the table where the specified column contains an error. The ISERROR function is a powerful tool for handling errors in your Power BI data. By using this function in conjunction with other DAX functions, you can check for errors, handle missing data, and filter out errors to ensure that your data is accurate and reliable. Power BI DAX Training Courses by G Com Solutions (0800 998 9248) Power BI DAX Intensive Training Course £1,050.00 – £26,550.00 Select optionsContinue Loading Done Power BI DAX Introduction £395.00 – £9,750.00 Select optionsContinue Loading Done Power BI DAX Intermediate £395.00 – £9,750.00 Select optionsContinue Loading Done Power BI DAX Advanced £395.00 – £9,750.00 Select optionsContinue Loading Done Upcoming Courses Contact Us Subject Your Name (required) Company/Organisation Email (required) Telephone Training Course(s) Power BI Intensive TrainingPower BI introduction Power BI IntermediatePower BI AdvancedDAXPower Query MPower BI CertificationPower BI AdministrationPower PlatformPower AutomatePower AppsOTHER Your Message Upload Example Document(s) (Zip multiple files) ```
``` ```
``` ```
``` ```
``` ```
``` ```