Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
54 | |
21 | |
12 | |
11 |