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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
nsewall
New Member

One Drive Data Source File Paths

Hello,

 

I'm trying to use a data source that exists within our company's one drive. The issue I'm having is that the file paths for one drive are different depending on who's account you're logged into so for example my file path would looks something like:

C:\Users\MyUsername\OurOneDriveFolder\etc

whereas my bosses' file path would look something like:

C:\Users\MyBossesUsername\OurOneDriveFolder\etc

 

This means in order for either of us to refresh the data we need to go in and manually update the file path if we weren't the last one to do so. I was looking for a way this could be done automatically.

 

I noticed that in the advanced options for Data Source Settings you can actually break up the file paths and use parameters for portions of them so I thought I could do something like 

 

C:\Users\

Parameter containing the username function

\OurOneDriveFolder\etc

 

But because the username function is not supported by calculated columns I couldn't figure out how to actually create a parameter for it since it only accepts list queries. Does anyone know a way I could create a parameter with the username function or another way to accomplish this?

 

Thank you!

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@nsewall Well, you could create a text parameter that must be updated manually. There is no concept of "environment variables" in M that I am aware of, so you can't use things like %username% for example.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

samdthompson
Memorable Member
Memorable Member

Yeah, this is a problem I found a while ago:

 

https://www.excelguru.ca/forums/showthread.php?10756-Acess-data-in-shared-onedrive-file&highlight=on... 

 

only solution would be to host it on your one drive and share it with someone who edits it on your instance.

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

4 REPLIES 4
samdthompson
Memorable Member
Memorable Member

Yeah, this is a problem I found a while ago:

 

https://www.excelguru.ca/forums/showthread.php?10756-Acess-data-in-shared-onedrive-file&highlight=on... 

 

only solution would be to host it on your one drive and share it with someone who edits it on your instance.

// if this is a solution please mark as such. Kudos always appreciated.

Good to know, thanks!

Greg_Deckler
Community Champion
Community Champion

@nsewall Well, you could create a text parameter that must be updated manually. There is no concept of "environment variables" in M that I am aware of, so you can't use things like %username% for example.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Good to know, thanks! I ended up just moving the file to our company's sharepoint. 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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