Problem
If you have created a Power BI report then you know that you need to select a data source at the beginning while creating a report. You have created all your visuals and pages and published a report to the Power BI service.
Now you want to replace or change your data source for some reason it could be that you need to connect your report to a live data source, or it's just a different Excel file or text file, or a different table in a different database or a different list in a different SharePoint site.
How can you do that? Is it possible? What are the different options to achieve it?
Solution
There are two ways by which you can achieve it. Depending on the type of data source you want to replace you can use one of the below approaches.
Replace the data source using the same connector
If you have created your report connected to an Excel file/CSV or text file and you want to replace that with some other file, then you can use this approach. Follow the below steps to do it.
Note. You must make sure that all columns used in the reports or used in modeling are present in the new file. Otherwise, you will get errors after you change the data source which in any case you can fix by working around it with data transformation steps.
Open your Power BI Desktop, and Open your PBIX file, From the Home tab expand "Edit Queries" and Click on Data Source Settings.

You will see your data source and the "Change source" button Click on that button to change your data source.

Click on the Browse button and Select your new data source file, Click on Close, Click on Apply Changes from the Yellow ribbon bar, and Check if all visuals are working fine, If not then again go to Edit Queries, find errors, and fix them.

Use different data source connectors as data sources are completely different.
You have created a report connected to an Excel file. Now you have decided to convert that Excel file into a SharePoint online list for better data management. So, you need to replace your report data source also from the Excel file to a SharePoint list. How to do this? The previous approach doesn’t work in this scenario. So, we need to work at the code level.







Join the conversation! Your thoughts help the community grow.