How to Manage Power Query Refresh Order for Queries and PivotTables
Question details
The user wants to understand the execution sequence when refreshing multiple Power Query connections, worksheet tables, and PivotTables within a single workbook.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Refreshing a complex workbook containing parent queries, child queries, and connected PivotTables using the 'Refresh All' command.
- Observed behavior
- The goal is to ensure that source queries are fully refreshed before dependent queries process, and that final data models update before PivotTables display the output.
Before modifying your workbook's refresh settings, open the Query Dependencies view to map out the relationship between your parent queries, child queries, and final tables.
Configure Query Connection Properties
Adjust background refresh settings to ensure PivotTables wait for Power Query to finish downloading data before updating.
Excel does not execute queries based on their creation order. Instead, Power Query automatically analyzes relationships and processes parent or source queries first to ensure data is available for dependent child queries.
However, if background refresh is enabled, PivotTables connected to the data model might attempt to refresh concurrently with the queries, resulting in outdated information until a second refresh is triggered.
Open your workbook, navigate to the 'Data' tab on the ribbon, and click 'Queries & Connections' to open the side panel.
Right-click on the specific query or connection that feeds into your PivotTable and select 'Properties' from the context menu.
In the Usage tab of the Connection Properties dialog box, uncheck the box labeled 'Enable background refresh' and click 'OK'. Repeat this for all relevant queries.

Use VBA for a Strict Refresh Sequence
If built-in dependency management is insufficient for complex models, use a VBA macro to execute refreshes in an exact sequence.
Looking for a Lightweight Alternative for Data Analysis?
Managing complex Power Query dependencies and VBA scripts can be highly resource-intensive. If you need a fast, reliable, and straightforward spreadsheet tool for everyday data processing and PivotTables, WPS Office offers a seamless experience with robust format compatibility.
- 1. Download WPS Office: Visit the official WPS website and click the free download button for your operating system.
- 2. Install the Software: Run the installer and follow the simple on-screen instructions to set up the software.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing Excel workbooks to effortlessly manage your data and PivotTables.

Frequently Asked Questions
Why do I have to click 'Refresh All' twice to update my PivotTable?
This usually happens because the PivotTable refreshes before the Power Query finishes loading the new data. To fix this, open the Connection Properties for your query and disable 'Enable background refresh'. This forces the PivotTable to wait for the new data.
Does Power Query refresh queries based on the order they were created?
No. Power Query ignores creation order. It analyzes the parent and child dependency relationships between queries and automatically processes source queries before their dependents.
Can I manually set the refresh order without using VBA?
You cannot explicitly set a strict numbered sequence without VBA. However, you can manage the flow by correctly setting up query dependencies in the Power Query Editor and disabling background refresh on your connections.




