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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.