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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.