Forum Discussion
How to change data source from EXCEL to SQL Server?
Hi Anonymous
First thing is to make a copy and work on the existing copy of the PBIX file so that you have a backup.
What I have done in the past is to import your data as you would from the SQL Server Tables into a table in the Query Editor.
The next steps involve using the Advanced Editor in the Query Editor, and what you would do is to copy all the steps from the SQL Server Tables query where it gives you all the column names.
Then take this and replace it in your Excel Source tables. It can be a little tricky but that will work, I have done it quite a few times in the past.
Thanks for the reply GilbertQ.
Actually me too doing the same thing.
But i thought there will be a direct solution for this.
- GilbertQ9 years ago
Super User
Hi Anonymous
No problem I do not think that there currently is any easier way.
- J_Tanna8 years agoFrequent Visitor
Hi GilbertQ
I am facing same problem. But not able to understand what you want to convey. Would you like to convey it in more detail? That could be a big elp for me.
Thank You.
- GilbertQ8 years ago
Super User
Hi J_Tanna
What you would need to do, is to go into the Query Editor, and create a new connection to your SQL Server Table.
Then once that is created you would then go into the Advanced Editor and copy all the M Code.
Next you would then need to go to your Excel Source, and replace all the steps that refer to the Excel Source and then replace it with the copied code from the SQL Server table.