Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sjhand
Frequent Visitor

Same Onedrive but different Data Source link in Power Query

Hi folks,

 

I am running into a unique situation. I have my work Onedrive account logged into my work laptop and my home computer in order to seamlessly access data.

 

For PowerBI, I mostly use data in Excel workbooks or folders in the Onedrive. The problem arises when I switch machines and the connection to the data breaks since the Location of the files is slightly different depending on the machine. Ex.  C:\jsmith\Onedrive\excel.xlsx vs C:\jbsmith\Onedrive\excel.xlsx.

 

To resolve this, I have to re-link the files under Data Source settings every time I switch machines.

 

Is there a way to dynamically link the Onedrive files so this situation doesn't happen?

1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

 Hi @sjhand - it appears that our referencing a Sync folder on the Local Machine.  In this case, I would recommend linking to the actual onedrive version.  Use OneDrive for Business links in Power BI Desktop - Power BI | Microsoft Learn.  Could you please try this first as it will be better if you publish the file to Power BI Web Service.  The Power BI Web Service will not connect to two separate devices and would two separate Data Gateway.  The OneDrive option will simplify everything.

Many thanks

Daryl

View solution in original post

2 REPLIES 2
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

 Hi @sjhand - it appears that our referencing a Sync folder on the Local Machine.  In this case, I would recommend linking to the actual onedrive version.  Use OneDrive for Business links in Power BI Desktop - Power BI | Microsoft Learn.  Could you please try this first as it will be better if you publish the file to Power BI Web Service.  The Power BI Web Service will not connect to two separate devices and would two separate Data Gateway.  The OneDrive option will simplify everything.

Many thanks

Daryl

This resolved my issue when it comes to directly linking to excel workbooks. Thank you.

 

I was also able to find a solution to linking to Folders here: https://community.powerbi.com/t5/Power-Query/Connect-Power-BI-Desktop-to-file-folder-on-OneDrive-for...

 

In a nutshell, use the sharepoint folder connector to connect to the root sharepoint/onedrive folder first.

 

Once in query editor, go to advanced editor and change Sharepoint.Files to Sharepoint.Contents . Now you will be able to navigate the folder structure inside Onedrive. Go to your appropriate folder and get your work done!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.