Forum Discussion
Power Query fetching data from file which changes weekly
- 2 years ago
Hi Kees
I believe you can combine files from sharepoint location as well. Sort by created date and index it and keept the lowest index:
How to combine files from sharepoint:
https://www.youtube.com/watch?v=mYkNDdjbFvo
Another approach we may think of is using a parameter storing file name and using in your query. everytime that parameter is updated, your main query will work dynamically. I can not test your code for this approach, becuase of dummysharepoint address, but I think above shared link might help you.
Hope it helps.
Hi Kees
I believe you can use folder option instead of a single file. That would then be just combing all the files in that folder, since you eventually have one file everytime, so infact result will be from a single file.
Addtionally if suits your case, with this option, you can duplicate the file name column and split it with common part and incremental part and filter the incremental part with descenting order, add index column, and keep that smallest index. This will ensure, even if older files remain in parallel somehow, query will not use those.
Hope it helps.