Share via

Load a Dynamic file from a sharepoint folder

Anusha Muniraju 0 Reputation points
2024-02-07T19:42:04.95+00:00

Hi, I have a scenario where we upload the input data file (File name and the sheet name can change) into the SharePoint folder which is then used in PowerBI to pull the data. The power query every time looks for the excel file with the same name, How do I solve this.

let     
Source = SharePoint.Files("My sharepoint site url", [ApiVersion = 15]),     
#"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = "My folder Path that is always constant")),    
#"Receipts Recon Master xlsx_MyFolderPAth" = #"Filtered Rows"{[Name="Receipts Recon Master.xlsx",#"Folder Path"=My folder path that is always constant}[Content],   
#"Imported Excel Workbook" = Excel.Workbook(#"Receipts Recon Master xlsx_My folder path that is always constant"),    
 Sheet1_Sheet = #"Imported Excel Workbook"{[0]}[Data] 
in     
Sheet1_Sheet


Basically, I want the name in this step to be dynamic
#"Receipts Recon Master xlsx_MyFolderPAth" = #"Filtered Rows"{[Name="Receipts Recon Master.xlsx",#"Folder Path"=My folder path that is always constant}[Content],

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.