Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I have a dashboard that pulls data from a CSV file in C:\Users\...\AppData\Roaming\ folder, but want to give this to someone else, who will have a CSV file in the same location on their PC.
Is there a way to have the PowerBI query grab the user's appdata folder path and update the data source automatically?
For example, in VBA i would just use Environ("AppData").
any help appreciated thanks!
Solved! Go to Solution.
Hi @tporteous
Power Query doesn't have such Environ function to get environment variable values from the local computer, so I'm afraid it is not possible to update the data source automatically.
As a workaround, you can set up a query parameter for the username. Then use the parameter name to replace the fixed username section in the file path. When you give this report to other people, they just need to edit the value of the username parameter to get data from their folder.
Reference: Parameters - Power Query | Microsoft Learn
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @tporteous
Power Query doesn't have such Environ function to get environment variable values from the local computer, so I'm afraid it is not possible to update the data source automatically.
As a workaround, you can set up a query parameter for the username. Then use the parameter name to replace the fixed username section in the file path. When you give this report to other people, they just need to edit the value of the username parameter to get data from their folder.
Reference: Parameters - Power Query | Microsoft Learn
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.