Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
LadyLily
Regular Visitor

Power Query - How to Change Data Source and Use Same Queries

Hello, 

 

I am using Power Query in Excel and I'm new to the function so apologies if this is very straightforward. I have multiple budget workbooks that have different names but the sheets are all named the same - Task 1, Task 2, Task 3 etc to Task 20.

 

I opened a new workbook, chose one of the budget workbooks as my data source, created a query named for each tab to clean the data in order to export it to a flat .csv file for upload into another program. 

 

This worked perfectly until I went to swap out the data source with a workbook with a different name. Instead of my queries for each task sheet running against the new data source, the Power Query Editor Added Task 1 (2), Task 2 (2), Task 3 (2) to my already existing list of queries. 

 

How do I change the data source for each of the existing queries without them duplicating? I tried to select all of my queries and change the source in the first applied step which actually worked but it only made the change on the last query in my selection. 

 

Is there an easier way to do this then manually going into the Source applied step for each of my 20 queries?

 

Thank you. 

1 ACCEPTED SOLUTION
BKirsch12
Resolver II
Resolver II

Are all your spreadsheets in the same exact format?

 

If so, you can use the from folder, and combine all the files.

 

Good link on this approach:  https://www.youtube.com/watch?v=4fFL7Ok7Ovg

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

I agree with @BKirsch12 that you probably want a Folder query here. But, if that is not what you are looking for, then you could create a query that just pulls in the data and does no other steps. Then, you would create your queries and reference that query. That way, you could just change the one query and all of your other queries would be pointing to the correct data source.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
BKirsch12
Resolver II
Resolver II

Are all your spreadsheets in the same exact format?

 

If so, you can use the from folder, and combine all the files.

 

Good link on this approach:  https://www.youtube.com/watch?v=4fFL7Ok7Ovg

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.