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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.