How to Fix FILTER #CALC! Error After Power Query Refresh
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.

- 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.
Verify your dataset to understand which filter criteria are resulting in no matching records before applying the formula fix.
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.
Click on the cell displaying the #CALC! error in your spreadsheet.
Look at the formula bar to find your nested FILTER function inside the MAX or MIN formula.
Append a fallback value such as an empty string ("") as the third argument in your FILTER function. For example: FILTER(ValueRange, Criteria, "").
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").
Press Enter to execute the formula and replace the #CALC! error with your specified fallback text.

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. Install WPS Office: Download and install WPS Office Free on your computer.
- 2. Open your workbook: Launch WPS Spreadsheet and open the .xlsx file containing your Power Query data.
- 3. Edit the formula: Click on the formula bar to modify your FILTER and IFERROR functions.
- 4. Save with full compatibility: Save your work; WPS Spreadsheet perfectly preserves the original format and complex formulas.

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.




