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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors