Sub topic 11
Loading the Result and Refreshing as Files Change
This chapter assumes you can open the Power Query editor, you have a folder query that combines files, and you know the basics of Excel tables and the Data ribbon. Here you load the combined result to the workbook and keep it current as files are added, replaced, or removed.
Loading the query
A query does nothing in the worksheet until you load it. In the Power Query editor, choose Home > Close & Load. The result appears as an Excel table on a new sheet.
To choose a different destination, use Close & Load To.... The dialog offers these options:
| Option | What it does | When to use it |
|---|---|---|
| Table | Puts the rows in a worksheet table | You want to see or filter the data directly |
| PivotTable Report | Builds a PivotTable on the result | You only need summaries |
| Only Create Connection | Saves the query without loading rows | The query is a helper for other queries |
| Add this data to the Data Model | Loads rows into the Data Model | The data is large or feeds Power Pivot |
The sample file, parameter, and function queries that Combine & Transform Data creates are helpers. They show as connection only, which is correct. Only the final combined query needs a table.
What refresh does
Refresh does not patch the table. Power Query runs the whole query again. It lists the folder, applies your filters, reads every remaining file, runs the function on each one, and replaces the table contents.
This means that:
- A new file that passes your filters is included on the next refresh.
- A file you replace with a new version is read again, and its new contents show up.
- A file you delete or move out of the folder disappears from the result.
- Nothing is cached per file, so a large folder takes longer to refresh each time.
Refreshing
Use any of these:
- Right-click the table and choose Refresh.
- Select a cell in the table and choose Data > Refresh All. This refreshes every query in the workbook.
- Open Data > Queries & Connections, then use the refresh button next to the query.
For automatic updates, open Data > Queries & Connections, right-click the query, and choose Properties. You can then set:
- Refresh every N minutes. This works only while the workbook is open.
- Refresh data when opening the file.
Common refresh problems
- A new file is missing. It probably fails a filter, such as the extension or the
~$prefix test from the filtering chapter. Check the filter steps in the first query. - Rows keep a stale value. The file may not have been saved. Save it, then refresh again.
- The refresh fails with a missing-column error. A new file has different column names from the sample file. The chapter on consistent structure covers this.
- The refresh fails after you move the workbook. The folder path is stored in the query. If the folder is not reachable from the new location, the query returns an error. A parameter makes the path easy to change.
- Old rows remain after a column is renamed. Load the table again and check that the Changed Type step still refers to existing columns.
Check your understanding
Exercise
You add a new file named 2026-11.csv to the folder, and you do not see its rows in the table. List two steps to take, in order.
Show answer
First, refresh the query (right-click the table and choose Refresh, or use Data > Refresh All), because the table does not update when the folder changes. If the rows are still missing, open the query and check the filter steps for the folder listing, since the file may be excluded by its extension or name. Closing the file if it is open elsewhere is also worth checking.
Exercise
A colleague types a correction into one cell of the loaded table. What happens to the correction at the next refresh, and where should the fix be made instead?
Show answer
The refresh replaces the whole table, so the typed correction is lost. Make the fix in the query, for example in the Transform Sample File query, or correct the source file, so the change is applied on every refresh.