cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
coolshib Frequent Visitor
Frequent Visitor

How to change source data from local drive to One Drive

Hi Everyone,

I have a report which i published from my Power BI desktop app. My Source data is stored on my local drive.

I have uploaded all my source data to my one drive and now i want to link my data source from local drive to One Drive in Power BI Services without hamperring the existing reports and Dashbords.

 

Please advice on this.

 

Thanks in advance.

 

Kind Regards

Shibsankar Ghosh.

1 ACCEPTED SOLUTION

Accepted Solutions
OwenAuger Super Contributor
Super Contributor

Re: How to change source data from local drive to One Drive

Hi @coolshib

 

I am assuming your source files are Excel files.

 

You will have to do two things:

  1. Find the appropriate URL pointing to your file on OneDrive
    If it's OneDrive for Business look here
    If it's OneDrive Personal see this post
  2. Change the step of your query that connects to the file from something like this
    =Excel.Workbook(File.Contents("C:\dummy\file.xlsx"),null,true)
    to something like this (OneDrive for Business)
    =Excel.Workbook(Web.Contents("https://XXXXX-my.sharepoint.com/personal/USER_XXXXX_onmicrosoft_com/Documents/folder/file.xlsx"),null,true)
    or something like this (OneDrive Personal)
    = Excel.Workbook(Web.Contents("https://onedrive.live.com/download?resid=XXXXXXX&authkey=YYYYYYYYYYY&em=x&app=Excel"), null, true)

The appropriate credentials would be needed for either connection.

 

Does that help?

 

Regards,

Owen



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




2 REPLIES 2
OwenAuger Super Contributor
Super Contributor

Re: How to change source data from local drive to One Drive

Hi @coolshib

 

I am assuming your source files are Excel files.

 

You will have to do two things:

  1. Find the appropriate URL pointing to your file on OneDrive
    If it's OneDrive for Business look here
    If it's OneDrive Personal see this post
  2. Change the step of your query that connects to the file from something like this
    =Excel.Workbook(File.Contents("C:\dummy\file.xlsx"),null,true)
    to something like this (OneDrive for Business)
    =Excel.Workbook(Web.Contents("https://XXXXX-my.sharepoint.com/personal/USER_XXXXX_onmicrosoft_com/Documents/folder/file.xlsx"),null,true)
    or something like this (OneDrive Personal)
    = Excel.Workbook(Web.Contents("https://onedrive.live.com/download?resid=XXXXXXX&authkey=YYYYYYYYYYY&em=x&app=Excel"), null, true)

The appropriate credentials would be needed for either connection.

 

Does that help?

 

Regards,

Owen



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




coolshib Frequent Visitor
Frequent Visitor

Re: How to change source data from local drive to One Drive

Thank you so much Owen Auger.

Much Appreciated.

Best Regards

Shib

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 264 members 2,906 guests
Please welcome our newest community members: