Forum Discussion
Power Query Editor Dynamic SharePoint Links
- Anonymous3 years ago
Hi Anonymous & serpiva64 - I would encourage you to simply the Power Query by introducing Table.SelectRows filter after the Source step using Text.Contains for the Folder Name filter. This will make it easy to manage the parameters passed from outside the query. The M advanced editor will look more like this.
let Source = SharePoint.Files(#"SharePoint Site", [ApiVersion = 15]), Folder = Table.SelectRows(Source, each Text.Contains( [FolderPath] , #"SharePoint Folder") ), File = Table.SelectRows(File, each [FolderPath] = #"SharePoint File"), #"Open Excel" = Excel.Workbook( File{0}[Content] ) in #"Open Excel"
This should make it possible to pass parameters to update the SharePoint Site and Folder and
Hi,
You can try creating a new parameter
then you use it in your selection
= Table.SelectRows(Source, each ([Folder Path] = "https://XXXXXXXX.sharepoint.com/sites/Ambienteditest/Documenti condivisi/"&Parameter1&"/"))
Then you can change your parameter in Desktop, in Power Query Editor and also in the Service
If this post is useful to help you to solve your issue consider giving the post a thumbs up
and accepting it as a solution !