metricsign
Start free
Medium severitydata format

Power BI Refresh Error:
Errors.HasError

What does this error mean?

The HasError field in a Power Query try expression record is true, indicating that a wrapped expression failed to evaluate and produced an error instead of a valid value. This typically surfaces when using try...otherwise patterns or expanding error records in Power Query.

Common causes

  • 1A column value in the source data is null, empty, or of an unexpected type that causes a transformation step to fail
  • 2A custom function or M expression wrapped in try returns an error due to invalid input data
  • 3Data source returns inconsistent schemas across rows, causing type conversion errors in specific records
  • 4Arithmetic or text operations applied to columns containing mixed or malformed values

How to fix it

  1. 1Step 1: In Power Query Editor, add a custom column using try [YourColumn] to expose the HasError, Value, and Error record fields for each row
  2. 2Step 2: Expand the resulting record column and filter rows where HasError equals true to isolate the problematic records
  3. 3Step 3: Inspect the Error.Message and Error.Reason fields on failing rows to identify the root cause of each individual error
  4. 4Step 4: Apply defensive transformations using try [expression] otherwise [defaultValue] to substitute safe fallback values for rows that error
  5. 5Step 5: Address upstream data quality issues in the source system or add explicit type checks and null guards before the failing transformation step

Frequently asked questions

Will Power Query silently ignore errors if I use try...otherwise, and will my report still show data?

Yes — try...otherwise will replace erroring values with your specified fallback, so the refresh will succeed. However, affected rows will carry the fallback value rather than the true value, which can silently skew your metrics. Always monitor error row counts to understand the extent of data quality issues.

How do I see all errors across my entire query, not just one column?

In Power Query Editor, go to View > Query Diagnostics or use Keep Errors / Remove Errors transforms on individual steps. You can also add a custom column with try [Step] and expand it to enumerate all row-level errors for a given transformation step.

Other data format errors