Power Query Problems

How to Keep Historical Power Query Results After Each Refresh in Excel

John WilsonJohn Wilson Nov 10, 2026 869 views

Question details

The user wants to retain historical data snapshots in a Power Query report after every refresh, preventing new data from overwriting previous results.

How to Keep Historical Power Query Results After Each Refresh
Product
Microsoft Excel
Device & OS
not provided
Scenario
Tracking historical totals and snapshots over time without losing previous refresh data when generating reports from CSV and XLSX files.
Observed behavior
By default, Power Query overwrites existing destination data upon refresh, which prevents the tracking of historical trends and snapshots.
Before you start

Ensure your source data queries are functioning correctly and back up your current workbook before setting up a self-referencing or appending historical query to avoid circular reference errors.

Solution 1Recommended

Create an Appending Historical Query

Set up Power Query to combine your previous results with the latest data snapshot using connection-only queries.

By splitting your query into an Old (existing data) and New (latest refresh) query, you can append them together. This ensures past data is retained while new records are added on each refresh.

1
Load Initial Data to a Table

Run your initial query and load the results to an Excel Table named 'Result'.

2
Create Connection-Only References

In Power Query, create a connection-only reference to this table and name it 'Result Old'. Then, duplicate your main data processing query, name it 'Result New', and also set it to connection-only.

3
Append the Queries

Create a new query and use the 'Append Queries' feature from the Home tab. Choose to append 'Result Old' and 'Result New'. This will stack the new results under the previous results.

4
Add a Refresh Date Column

Before loading the appended data, go to Add Column > Custom Column and use the formula 'DateTime.LocalNow()' to stamp the rows with the current refresh time.

5
Load the Historical Output

Close and Load this combined query to a new Excel table. This table will now serve as your growing historical record.

Create an Appending Historical Query
Preventing Uncontrolled Duplication: Ensure the historical output is not used as the source for itself in a way that causes infinite loops. Always maintain clear separation between your 'Old' and 'New' connection-only queries.
Free Microsoft Office alternative

Process and Analyze Data Efficiently with WPS Office

If managing complex Power Query setups and self-referencing tables in Excel becomes overwhelming, consider WPS Office. It provides a lightweight, highly compatible spreadsheet tool equipped with robust data analysis features, pivot tables, and charting capabilities.

  1. 1. Download and Install WPS Office: Visit the official WPS website to download the free suite and follow the installation prompts.
  2. 2. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing .xlsx or .csv data files directly with full formatting retained.
  3. 3. Track Data with PivotTables: Use the Data tab and built-in PivotTable tools to efficiently summarize, append, and visualize your historical data records.
Fully compatible with Microsoft Excel formats (.xlsx, .csv, .xls)Lightweight and fast for handling large datasets and historical trackingFamiliar user interface for seamless migration without a steep learning curveBuilt-in advanced data analysis, charting, and PivotTable tools
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query overwrite my data on refresh?

By default, Power Query is designed to clear the destination table and replace it with the latest data pulled from the source. To keep history, you must configure a self-referencing query or append new data to an independently saved historical table.

Will a self-referencing query cause an infinite loop in Excel?

It can if not set up properly. To prevent circular reference errors or uncontrolled data duplication, it is crucial to keep the source table and the final output table strictly separated using connection-only queries for the intermediate steps.

How do I add a timestamp to my historical Power Query data?

You can add a Custom Column in the Power Query Editor using the formula DateTime.LocalNow(). This will stamp each row processed during the refresh with the current date and time, making it easy to identify historical snapshots.