Is it possible to reference a Power Query in another workbook?

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
I have a workbook containing some Power Query queries. It's a rather involved set up in pulling from different sources and linking tables, so it's tedious to do. But I want to use these queries in a few different ways, that require me to have different workbooks storing the output.

Is there a way to reference Workbook A's Power Query model from Workbook B to avoid having to recreate the entire model?

Or is there a better way to basically share the query between workbooks?

I know I can copy/paste from the Advanced Editor, but this is time consuming and if I potentially need to change some part of the query, I need to change it in many places.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Cut and paste in the advanced editor is the current best method. In Excel 2016 there is better VBA support, but the effort to build something would be more than the cut and paste I think. If you have multiple queries, just save the master workbook with a new name and start from there.

An alternative approach is to load all the queries as tables in the master workbook. Then do a simple table import into any other workbook that needs it. The second workbook will not trigger a query refresh on the first, so you will need to either manually refresh the first workbook or schedule it using power update or some other method.
 
Last edited:
Upvote 0
Cut and paste in the advanced editor is the current best method. In Excel 2016 there is better VBA support, but the effort to build something would be more than the cut and paste I think. If you have multiple queries, just save the master workbook with a new name and start from there.

An alternative approach is to load all the queries as tables in the master workbook. Then do a simple table import into any other workbook that needs it. The second workbook will not trigger a query refresh on the first, so you will need to either manually refresh the first workbook or schedule it using power update or some other method.
Has PQ evolved in any way since last post to accommodate referencing of queries between, rather than within, workbooks, WITHOUT loading in sheets/tables (or copy pasting the query ;) ). Perhaps even syncing them??
 
Upvote 0
Has PQ evolved in any way since last post to accommodate referencing of queries between, rather than within, workbooks, WITHOUT loading in sheets/tables (or copy pasting the query ;) ). Perhaps even syncing them??
What about automating data flows (if that is the right jargon)? Can above be achieved with say Power Automate?? (If so, how?)
 
Upvote 0

Forum statistics

Threads
1,214,570
Messages
6,120,294
Members
448,953
Latest member
Dutchie_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top