In Power BI, through the Power Query Editor, you can modify the data source. Power BI offers various methods for changing the data source, let’s understand with an example.
Approach 1:
Step-1:Navigate to the “Home” tab in the Power BI header menu, and within this tab, click on “Transform Data”.

Transform Data
Step-2:When the Power Query Editor window opens, click on “Data source settings”.

Data source setting
Step-3: Now, select the existing data source that you want to modify, and click on Change Source.

Select Data Source
Step-4:When the SQL Server Database screen appears, enter your server and database name, then click ‘OK’.

Change Data source Power BI
Step-5: Now, click the ‘Close’ button, and then select ‘Close & Apply’ from the top left corner.
Ensure that your new database contains all the tables and queries from the old database, with the same names and definitions. Otherwise, your report visuals may not function correctly.
Approach 2:
Step-1: Under Power Query Editor, select your Dataset then click on source setting icon.
Step-2: After that SQL server Database screen appear, write your server & Database name and you can also change your query from here.
Step-3: After all steps click to OK, then Close & apply.
How to replace Data Source for existing report?
Step-1: Under Power Query Editor, select Dataset then click to Advance editor.

Change Data Source Advance Editor
Step-2: Advance Editor window appears, now change your server & database name and click on Done.

Advance Editor Power Bi
Hope you enjoy the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.