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
qxphm
New Member

Adding parameter based on username to data source

Dear All,

We started using Onedrive in my company which ended up having our own username in data source's paths.

Therefore, whoever would like to refresh the Power BI destop, needs to change the source first to the new path with his/her own username. Something like:

C:\Users\ username \OneDrive\Desktop

Is there any way to automate it? For example to create a parameter that will automatically find the name of the current user and adjust it automatically in the data source? In VBA there's a function Environ() that is really helpful, not sure if something similar exists in Power BI.

Thank you in advance.

 

1 REPLY 1
Idrissshatila
Super User
Super User

Hello @qxphm ,

 

Check this video it will help your with your case

https://www.youtube.com/watch?v=XIq5vN5oPf8&t=89s

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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