How to change data source in Power Bi

In this Microsoft Power BI Tutorial, We will discuss how to change the data source in power bi, what are the different ways to change the data sources in Power BI.

Also, we will see how to change the data sources in Power BI by taking a simple example.

Change data source in Power bi

Suppose in your organization, you made a Power BI Report in your local system (Desktop). Now you want to change the Data Source of that report even after it is being created.

Now You may think about why you want to do this after creating the Power BI Report. Let me explain to you briefly so that you can understand easily.

Suppose in case of the Data Source location has changed or you want to jump from one server to another server as like from a development environment to a production environment.

So if these types of scenarios came after you created a Power BI report, then, in that case, you have to change the Power BI Data Sources.

Example:

Let’s take an example. In this example, I have a Text Document in my local Desktop. The text document name is Employee Details which contains these below fields about the employees as:

  • Employee Name
  • Employee Category
  • Salary
power bi change data sources

Now open your Power BI Desktop page and sign in with your existing Microsoft account. Once you signed in, just go to the File tab -> Select Get Data -> Click on Text/CSV as shown below.

power bi change data source

Browse your .txt file (Employee Details) and click on Load. Here, In the below screenshot, I have taken a Table under the Visualization section and shown all the Employee Details data using the table like the below screenshot.

change data source power bi online

Now go to the Edit Queries button from the File tab and click on Edit Queries option.

change data source power bi desktop

After clicking on the Edit Queries option, you can see the below screen. In the ribbon section, Click on the Advanced Editor option from the Query section.

power bi change data source for visualization

When you will click on the Advanced Editor option, you can see the current folder path as shown below.

change data source power bi report

Now you just rename a column name. Here, I have renamed my salary column to Employee Salary by double-clicking on the column name.

change data source power bi service

If you will click on again to the Advance Editor option, then you can see the changes screen as like the below screenshot.

change data source power bi report server

Different ways to change Data Source Settings in Power BI

There are various ways present where you can change the Data Source Settings in the Power BI Desktop. Below are those different ways which I have explained below:

  1. By using Edit Queries:

To change the Power BI Data Source, In your Power BI Desktop, Go to the File tab and then click on the Edit Queries button under the External data section. Then select Data source settings as shown below.

how to change data source in power query 2016

2. By using Data source settings:

Similarly, In the Query editor page, you can directly click on the Data source settings button from the ribbon. Once you will click this button, then the Data source settings window will appear as shown below.

In the Data source settings window, Enable the Data sources in current file (by default it was enabled), Select the folder path and click on Change Source button as below.

change data source power bi web

3. By using Advanced Editor:

You can also change the Power BI Data Source by using the Advanced Editor button. Go to the View tab and click on the Advanced Editor button under the Advanced section.

Here in this Data Source settings window, you can view the full folder path of the Power BI Table.

If you want to change the data source path of the Power BI Report, then you can directly modify it here. Once it is done, then click on the Done button.

power bi change data source type

How to change Power BI Data Source Settings

In the Query Editor window, when you will click on the Data source settings button, then the below page will come.

change data source power bi web

In that Data Source Settings page, when you will click on the Change Source button, then you can view this below page where you can modify your file path.

Enable Basic option (If it was not enabled). Here I will show you how to modify your file path.

change data sources power bi

Here, I have another Text Document named as Employee Updated Details. In this text document, you can see all the fields with the same name as the previous document (Employee Details) one.

I have just updated the salary of each employee as below. Now I want to change the data source with this below-updated text document one.

change data source power bi

Click on Browse and choose your file from your local system where you have saved. As I have saved this updated file in the same folder path, So I have uploaded from the same location. Once it is done, Just click on OK.

change data sources in power bi.png

After clicking on OK, You can see your data sources in the current file path have been changed from Employee Details to Employee updated details as shown below. Just Close it.

change data sources in power bi

Once everything is done, just Refresh the page to view the updated data. When I have refreshed, then my Salary column is updated with new values as like the below screenshot. Just click on the Close and Apply button from the ribbon.

how to change data sources in power bi

Now go to the Power BI Desktop page. On that page, you can see my Employee Details report with updated values as shown below.

how to change power bi data sources

Also, You may like the below Power BI tutorials:

Hence in this Microsoft Power BI Tutorial, We discussed what is the Power BI Change Data Sources, what are the different ways to change the data sources in Power BI.

Also, we saw how to change the data sources in Power BI by taking the above simple example.

>