Power Query Problems

Detect Failed Source Queries in an Appended Excel Power Query

Phi Hung VoPhi Hung Vo Nov 18, 2026 869 views

Question details

Identify which source queries fail when refreshing an appended Power Query.

Detect Failed Source Queries in an Appended Excel Power Query
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
Several source queries are combined into one appended table, and the user wants a separate refresh status for each source.
Observed behavior
The user wants failures to be visible rather than relying silently on previously loaded data.
Before you start

In Excel, open Data > Queries & Connections and identify the names of the source queries and the columns expected in the appended result. Check that the source queries reference the original data sources rather than previously loaded worksheet tables.

Solution 1Recommended

Create an appended query with a separate source status table

Use Power Query error handling to append successful source tables and report source-level failures.

The staging query below returns both an appended table and a status table. It checks each source with try and records its name, success flag, and error message.

The check catches errors encountered while evaluating and buffering each source table. It does not necessarily detect errors stored in individual cells or nested values.

1
Create a staging query

In Excel, select Data > Get Data > From Other Sources > Blank Query, then open Home > Advanced Editor in Power Query Editor.

2
Add the error-handling code

Replace the editor contents with the code below. Replace SourceA and SourceB, including the names in quotation marks, with your actual source query names. Add another Check entry for each additional source. let Check = (queryName as text, getSource as function) as record => let result = try Table.Buffer(getSource()) in if result[HasError] then [Query = queryName, Success = false, ErrorMessage = try result[Error][Message] otherwise "Unknown error", Data = null] else [Query = queryName, Success = true, ErrorMessage = null, Data = result[Value]], Checks = List.Buffer({ Check("SourceA", () => SourceA), Check("SourceB", () => SourceB) }), SuccessfulTables = List.Transform(List.Select(Checks, each _[Success]), each _[Data]), Appended = if List.IsEmpty(SuccessfulTables) then #table({"Status"}, {}) else Table.Combine(SuccessfulTables), Status = Table.FromRecords(List.Transform(Checks, each [Query = _[Query], Success = _[Success], ErrorMessage = _[ErrorMessage]])) in [Data = Appended, QueryStatus = Status]

3
Create the output queries

Name the staging query AppendWithStatus. Create two blank queries in Power Query Editor: set one query's formula to = AppendWithStatus[Data] and the other to = AppendWithStatus[QueryStatus]. Name them AppendedData and QueryStatus.

4
Load and refresh both tables

Use Home > Close & Load To for AppendedData and QueryStatus to load each as a worksheet table. Select Data > Refresh All, then check QueryStatus for rows where Success is false and read the ErrorMessage column.

Create an appended query with a separate source status table
Refresh timing and empty results: The two loaded queries may be evaluated separately, so their results are not guaranteed to represent the same instant if a source changes during refresh. If every source fails, the example returns an empty table with a Status column; replace that fallback with your expected column schema if needed.
Free Microsoft Office alternative

Review Excel Workbooks with WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Excel format compatibility, making it easy to open and work with existing workbooks. Use Excel Power Query for the source-query error handling described above.

Open and review worksheet tables containing query status resultsCompatible with Microsoft Excel XLSX and XLS filesFamiliar spreadsheet interface for an easier transitionFree and lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Where can I see which source query failed?

After loading QueryStatus to a worksheet, select Data > Refresh All and look for false in the Success column. The Query and ErrorMessage columns identify the source and its reported error.

Will the appended table include data from a failed source?

The example appends only sources whose checks succeed. A failed source contributes no table to that evaluation, so review QueryStatus before relying on the appended result.

Does this method catch errors in every cell?

No. The try and Table.Buffer check catches errors encountered while evaluating the source table, but individual cell errors or errors in nested values may require additional checks in Power Query Editor.

Why might the status table and appended data show different refresh results?

Excel can evaluate the two output queries separately. If a source changes or becomes unavailable between evaluations, their results may differ; refresh both with Data > Refresh All and investigate any inconsistent status.