Forum Discussion
Anonymous
5 years agoNot applicable
How can I pick the latest file with Power Query?
Hello How can I pick the latest file from a list of sharepoint files in a folder using Power Query? Thanks!
- 5 years ago
Hi Anonymous ,
The power query code is like this:
let Source = SharePoint.Files("https://xxx.sharepoint.com/sites/xxx", [ApiVersion = 15]), #"Filtered Rows" = Table.SelectRows(Source, let latest = List.Max(Source[Date modified]) in each [Date modified] = latest) in #"Filtered Rows"Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mahoneypat
5 years agoMicrosoft Employee
You can do this with a relative reference instead of an absolute one to a specific file. Please see this video and subscribe to that channel if you find it useful.
https://www.youtube.com/watch?v=nscUeOL5m90
Regards,
Pat