This post describes how to change a Power BI data source from a CSV or Excel data source to a SQL Server Database connection.
This is not very intuitive because Power BI does not yet have a button to “Change Data Source Type”, but this can be done using the Advanced Editor in Power Query.
In this example a CSV File is missing and we will replace it with a SQL table
1) Select "New Source"
2) Set up the connection to the SQL Database
3) Select the SQL Table or View
4) Click "Advanced Editor"
5) “Select All” and “Copy” the code in the advanced editor window. Close the window.
6) Open the “Advanced Editor” for the source that we are going to replace
7) Overwrite the old code with the code for the new source (copied in step 5)
8) Click “Done” then “Close and Apply”
Posted by Evan Schmidt