How to Change an Excel PivotTable from a Workbook Range to Power Query
Question details
The user wants to update the data source of an existing Excel PivotTable from a standard workbook range to an external Power Query connection.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Transitioning an existing PivotTable report to use a more robust, external data model via Power Query.
- Observed behavior
- Excel does not support directly changing the data source of an existing PivotTable from a local range to a connection-based source, requiring a workaround.
Before recreating your PivotTable, take a screenshot or note down the current layout, including the rows, columns, values, and filters used, so you can rebuild it quickly.
Recreate the PivotTable Using a Power Query Connection
Since Excel limits switching between fundamentally different source types, the standard solution is to rebuild the PivotTable using your new Power Query connection.
Excel treats local range data and external connections (like Power Query or the Data Model) as distinct cache types. Because of this architectural difference, a direct source swap is disabled. Rebuilding the PivotTable is the most reliable way to transition your data source.
Ensure your Power Query data is ready by going to the Data tab, selecting 'Get Data', and configuring your external data import.
Navigate to the Insert tab on the ribbon, click 'PivotTable', and select 'From External Data Source' from the drop-down menu.
Click the 'Choose Connection' button, navigate to the 'Connections' tab in the prompt, and select the specific Power Query connection you created.
Using the PivotTable Fields pane, drag and drop your fields back into the Rows, Columns, Values, and Filters areas to match your original report.

Try WPS Office for Seamless Spreadsheet Management
While managing complex external data connections in Excel can sometimes be rigid, WPS Office offers a lightweight, highly compatible, and free alternative for your daily spreadsheet, PivotTable, and data analysis needs. Enjoy a familiar interface and seamless migration.
- 1. Download and Install: Visit the official WPS website to download and install the free WPS Office suite on your device.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheets and open your existing .xlsx files instantly with perfect formatting compatibility.
- 3. Analyze Data with PivotTables: Go to the Insert tab and use the PivotTable feature to quickly analyze and summarize your datasets.

Frequently Asked Questions
Can I change an existing PivotTable source from one workbook range to another?
Yes. If both sources are standard workbook ranges, you can click on the PivotTable, go to the PivotTable Analyze tab, select 'Change Data Source', and highlight the new range.
Why is 'Change Data Source' grayed out on my PivotTable?
The 'Change Data Source' option is often grayed out if the PivotTable is connected to the Data Model, an OLAP cube, or a specialized Power Query connection that doesn't permit manual range editing.
How do I update the data in a PivotTable connected to Power Query?
Right-click anywhere inside the PivotTable and select 'Refresh', or navigate to the Data tab and click 'Refresh All'. This triggers Power Query to fetch the latest data and updates your PivotTable.




