How to change data source in Power BI

In this power bi tutorial, we will discuss What is data source in power bi. And also we will discuss the below points:

  • Power bi desktop how to change the data source
  • Power bi change data source after publish
  • Power bi desktop change data source credentials
  • Power bi desktop change data source location

What is Data Source in power bi desktop?

In power bi, data source is where data in the dataset comes from. The power bi desktop support large range of data source.

You can connect power bi desktop to the data source by clicking on getting data present in the ribbon. It will show you different types of data sources

Power bi desktop how to change the data source

Here we will see how to change data source in power bi desktop by using the sample data.

  • Open your Power Bi desktop
  • Upload the data by using the Get Data. Here I have taken the sales excel sheet.
  • Then create visualization by using the data.
Power bi desktop how to change the data source
Power bi desktop how to change the data source
  • Click on File from the ribbon in power bi desktop.
  • Then Click on Option and Setting. Select Data Source setting.
How to change data source in power bi
How to change data source in power bi
  • In the Data source setting Dialog box, click on the Change source.
  • Next, to the file path, click on browse and select the excel file. Click on OK
  • Make sure that the excel file, must have the same column as old excel data. Otherwise, your report will break or it will show an error.
microsoft power bi how to change data source
microsoft power bi how to change data source
  • Now click on Apply changes from the yellow ribbon bar.
Power bi desktop how to change the data source
how to change data source in power bi desktop
  • Now your power bi is connected to the new data source. Check you visual are not change as the data source is changed.

Read Power bi slicer filter another slicer

Power bi change data source after publish

Here we will see power bi change data source after publish.

We need the data from the OneDrive business excel and then we will create the report by using the data and then we will publish the report.

To get excel data from the OneDrive business, first, we have to load the excel data into OneDrive business.

  • Open your OneDrive business
  • Go to the excel sheet which you have uploaded to the OneDrive business and next to that click on more icon -> Details.
Power bi change data source after publish
Power bi change data source after publish
  • In Details page, scroll down to path, click on the copy icon to copy the link.
Power bi change data source after publish
copy link of excel sheet from onedrive business
  • Open the Power bi desktop.
  • In the Home tab, click on the Get Data -> Web.
Microsoft Power bi change data source after publish
Microsoft Power bi change data source after publish
  • In the From web dialog box, under URL paste the link. Click on OK and login with the credential.
Microsoft Power bi change data source after publish
get data from web in power bi desktop
  • From Navigator dialog box, select the table and then click on Load.
Microsoft Power bi change data source after publish
Microsoft Power bi change data source after publish
  • Create a report by using the data and publish that report to power bi service. In the below screenshot, you can see the report.
Power bi change data source after publish
report in power bi
  • Open your power bi service by click here.
  • Go to Workspace and select the report, now in the below screen shot you can see the report
Power bi change data source after publish
report in power bi
  • Now we will set the Schedule Refresh for Power bi report.
  • Click on the Workspace. Next to published dataset click on the Schedule icon.
Power bi change data source after publish
Schedule refresh in power bi service
  • Under Data source credential, click on Edit credential.
Power bi change data source after publish
Edit credential for power bi service
  • Under Authentication method, select OAuth2. And under privacy level setting for this data source, select Organizational. Click on Sign in. Enter your login and password.
Power bi change data source after publish
Schedule refresh in power bi
  • Under schedule refresh, turn on the schedule refresh.
  • Set the refresh frequency as Daily or weekly. Then you can add time click on Add another time.
  • Click on Apply
Microsoft Power bi change data source after publish
Schedule refresh in power bi service
  • You can see the Power bi change data source report after publish to power bi service
Microsoft Power bi change data source after publish
Microsoft Power bi change data source after publish

Read: Power BI Donut Chart

Power bi desktop change data source credentials

Let’s see power bi desktop change data source credential.

  • In power bi desktop, Click on File.
  • Click on Option and setting -> Data source setting.
power bi desktop change data source credentials
power bi desktop change data source credentials
  • Select Global permission. Then select the data source from the list. Click on Edit permission.
  • For an excel data source that is loaded from a local computer to power bi, you can change the privacy level permission.
microsoft power bi desktop change data source credentials
microsoft power bi desktop change data source credentials
  • If you loading data from Online service like SharePoint, for that you can change the permission.
  • In Data source setting -> Global permission. Select the SharePoint site. Click on Edit permission.
Power bi desktop change data source credentials
Edit permission in power bi desktop
  • In the Edit permission page, click on Edit under Credential.
  • Under privacy level, select the privacy level permission for your power bi report, here i have selected organizational.
Microsoft power bi desktop change data source credentials
Microsoft power bi desktop change data source credentials
  • Now you can give Anonymous permission i.e. anyone can use and no credential is required.
  • If you are selecting windows, then enter your windows username and password.
  • If you are selecting the Microsoft account, then enter the Microsoft username and password. I have already signed in with a credential.
Microsoft power bi desktop change data source credentials
Microsoft power bi desktop change data source credentials

Read Power bi treemap – How to use

Power bi desktop change data source location

Here we will see power bi desktop change data source location using the excel sheet as a data source.

Scenario

  • I have already loaded the data source i.e. excel sheet and created the report by using the data source in power bi desktop.
  • Now if I change the location of the excel sheet and I make some changes with data, then I will click refresh to refresh the data source in the power bi desktop.
  • It will show an error message ” Could not find a file with the previous location”.
Power bi desktop change data source location
Power bi desktop change data source location

Lets solve this problem by changing the location of data source in power bi.

  • First copy the new file path of your excel sheet from your local computer.
Microsoft Power bi desktop change data source location
Microsoft Power bi desktop change data source location
  • In power bi desktop, click on the File -> option and setting -> Data source setting.
Microsoft Power bi desktop change data source location
Microsoft Power bi desktop change data source location
  • Click on Change source in the Data source settings dialog box.
  • Then paste the path under File Path and click on Ok.
Microsoft Power bi desktop change data source location
Microsoft Power bi desktop change data source location

Now in power bi desktop change data source location is done, and you can check it by changing the data in excel sheet.

In this power bi tutorial, we discuss about What is Data Source in power bi desktop. And also we will discuss about the below points:

  • Power bi desktop how to change the data source
  • Power bi change data source after publish
  • Power bi desktop change data source credentials
  • Power bi desktop change data source location
>