Power Query Problems

How to Fix FILTER #CALC! Error After Power Query Refresh

Camila MilosovichCamila Milosovich Nov 10, 2026 868 views

Question details

The user needs to fix a #CALC! error that appears when a FILTER formula combined with MAX or MIN returns an empty array after refreshing Power Query.

How to Fix FILTER #CALC! Error After Power Query Refresh
Product
Spreadsheet
Device & OS
not provided
Scenario
Refreshing a dataset via Power Query where the new data yields no results matching the filter criteria.
Observed behavior
A MAX or MIN formula returns a #CALC! error indicating an 'Empty Array' because the nested FILTER function finds no matching records.
Before you start

Verify your dataset to understand which filter criteria are resulting in no matching records before applying the formula fix.

Solution 1Recommended

Use the if_empty Argument with IFERROR

The most effective way to prevent the #CALC! error is to handle the empty array directly within the FILTER function's optional argument.

The #CALC! error in dynamic arrays is triggered when the FILTER function finds no rows meeting your conditions, leaving MAX or MIN with nothing to calculate. By declaring a fallback value for empty results, you can bypass the error entirely.

1
Select the error cell

Click on the cell displaying the #CALC! error in your spreadsheet.

2
Locate the FILTER function

Look at the formula bar to find your nested FILTER function inside the MAX or MIN formula.

3
Add the if_empty argument

Append a fallback value such as an empty string ("") as the third argument in your FILTER function. For example: FILTER(ValueRange, Criteria, "").

4
Wrap with IFERROR

Enclose the entire formula with the IFERROR function to catch any residual errors from MAX or MIN operating on an empty string. Format it like this: =IFERROR(MAX(FILTER(ValueRange, Criteria, "")), "NO DATA").

5
Apply the new formula

Press Enter to execute the formula and replace the #CALC! error with your specified fallback text.

Use the if_empty Argument with IFERROR
Formula Clean-up: Using "" inside FILTER prevents the empty array error, while IFERROR ensures a clean, customizable output like 'NO DATA' instead of a generic calculation failure.
Advanced Spreadsheet Data Analysis

Handle Dynamic Arrays Seamlessly in WPS Office

WPS Spreadsheet fully supports advanced dynamic array functions like FILTER and IFERROR, helping you build robust data models and resolve query errors without compatibility issues.

  1. 1. Install WPS Office: Download and install WPS Office Free on your computer.
  2. 2. Open your workbook: Launch WPS Spreadsheet and open the .xlsx file containing your Power Query data.
  3. 3. Edit the formula: Click on the formula bar to modify your FILTER and IFERROR functions.
  4. 4. Save with full compatibility: Save your work; WPS Spreadsheet perfectly preserves the original format and complex formulas.
Full compatibility with Microsoft Excel formulas and the .xlsx file format.Native support for dynamic array functions including FILTER, UNIQUE, and SORT.Lightweight software with fast calculation speeds for heavy Power Query datasets.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the FILTER function return a #CALC! error?

The #CALC! error typically occurs in dynamic array formulas when the FILTER function returns an empty array because no records in your dataset match the specified criteria.

Can I use something other than 'NO DATA' in my IFERROR function?

Yes, you can replace 'NO DATA' with any custom text, a number (like 0), or leave it as an empty string ("") depending on how you want your dashboard or report to display empty results.

Does refreshing Power Query cause formula errors directly?

Power Query itself does not cause the error. However, when a refresh brings in updated data where previous filter conditions are no longer met, dependent formulas might suddenly evaluate to empty arrays, triggering the #CALC! error.