Forum Discussion
misen13
7 years agoFrequent Visitor
Dynamic folder location
Hi, I'd like to know if there is a way to dynamically set a folder path if I have to update all the Excel files in the folders every week? IE: On my desktop, I have a folder named: KPI. KPI has...
- 7 years ago
I think this there is another way to make folder dynamic
This is via an Excel Table or Named Range
Now in your query you can define the folderpath which is linked to a Cell in ExcelTablelet FolderPath= Excel.CurrentWorkbook(){[Name="FolderDefinition"]}[Content]{0}[Column1], Source = Excel.Workbook(File.Contents(FolderPath & "FileName.xlsx"), null, true), MyTable = Source{[Item="Table1",Kind="Table"]}[Data] in MyTable
v-cherch-msft
Microsoft Employee
7 years agoHi misen13
Here is the document for your reference.
https://biinsight.com/power-bi-desktop-query-parameters-part-1/
Regards,
Cherie
- Zubair_Muhammad7 years ago
Community Champion
I think this there is another way to make folder dynamic
This is via an Excel Table or Named Range
Now in your query you can define the folderpath which is linked to a Cell in ExcelTablelet FolderPath= Excel.CurrentWorkbook(){[Name="FolderDefinition"]}[Content]{0}[Column1], Source = Excel.Workbook(File.Contents(FolderPath & "FileName.xlsx"), null, true), MyTable = Source{[Item="Table1",Kind="Table"]}[Data] in MyTable