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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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