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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Data Source with same query editor change

Hello,

I used an excel file as my data source and have used the query editor to transform the data. Now the data comes from an excel file in share point however the data is in the same format as the original excel file I've used. So, I want to keep the same query editor edits. What is the right way to change the data source will keeping the same query editor edits?

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

You could just replace the datasouce for this pbix file as below:

https://community.powerbi.com/t5/Desktop/How-to-replace-Data-Source-for-existing-report/td-p/58947

 

https://www.c-sharpcorner.com/article/how-to-change-data-source-of-existing-report-in-power-bi/

https://windowsreport.com/change-data-source-power-bi/

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

You could just replace the datasouce for this pbix file as below:

https://community.powerbi.com/t5/Desktop/How-to-replace-Data-Source-for-existing-report/td-p/58947

 

https://www.c-sharpcorner.com/article/how-to-change-data-source-of-existing-report-in-power-bi/

https://windowsreport.com/change-data-source-power-bi/

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DataInsights
Super User
Super User

Here's the approach I use:

 

--In the original query, go to Advanced Editor and copy the M code. Paste in Notepad.

--Create a new query that points to the SharePoint spreadsheet.

--In the new query, go to Advanced Editor.

--Copy the transformation steps from the original query in Notepad, and paste below the auto-generated steps in the new query. You'll have to account for the renaming of steps to make it integrate.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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