Forum Discussion
vertokite
3 years agoFrequent Visitor
Using Windows environment variable in a PowerBI desktop parameter
Hello I'm trying to use the windows environment variable %USERNAME% as part of a parameter to define source setting. The source data line in the editor looks like this: source = Excel.Wo...
marcelsmaglhaes
3 years agoSuper User
Hey vertokite try type "=Environ("VariableName")" nn the "Current Value" field.
***(replace "VariableName" with the name of the Windows environment variable you want to use).
Kind Regards,
Marcel
- vertokite3 years agoFrequent Visitor
Hi Marcel and many thanks for taking the minute to help me out. Since I'm still kind of a beginner I'm not entirely sure to understand your suggestion. What would I type in the parameter for the filepath:
=Environ("USERPROFILE")\PowerBI\ which should resolve to C:\user\"username"\PowerBI.
I cant get this to work. Maybe I misunderstood you. Thanks again