The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.