This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
I am using an Excel file stored on Sharepoint site and I would like to keep the folder dynamic.
It currently hits an error during data refresh on Power BI Service.
Here is my code:
strFolder = TblFolder{0}[Data Folder],
Source = Excel.Workbook(Web.Contents(strFolder & "Alibaba.xlsm"), null, true),
Appreciate your help.
hcze
Solved! Go to Solution.
@hcze
You can create a query parameter with foldernames. Then apply the parameter to code, make the str folder = the parameter name (Folder Name in the example). Something like:
strFolder = TblFolder{0}[Folder Name]
Source = Excel.Workbook(Web.Contents(strFolder & "Alibaba.xlsm"), null, true),
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@hcze
You can create a query parameter with foldernames. Then apply the parameter to code, make the str folder = the parameter name (Folder Name in the example). Something like:
strFolder = TblFolder{0}[Folder Name]
Source = Excel.Workbook(Web.Contents(strFolder & "Alibaba.xlsm"), null, true),
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |