Forum Discussion
Get most recent file for a report from Folder
Is there a more elegant solution than removes the risk of a missed step?
Currently, I have a folder with multiple CSV that feed 5 other reports in one PBIX.
In that same PBIX, I have one report that only views the most recent CSV in that folder.
Each time the data is refreshed, I change the filter for that one report to view the most recent file.
I do not want to do that previously mentioned step. I want Power BI to automagically know I want that.
This data was no other relationships beyond itself, fortunately.
Searching around, all other options appear geared towards pushing the whole PBIX to only look at one file. I need the other data too. I found the following article and gave it a twist ... bascially, new query for only the most recent file, copy the transformations, and wire the one report up to that query. (https://wkrzywiec.medium.com/getting-data-from-the-latest-file-in-a-folder-using-power-query-51dfa4bff711)
It works, but I had to copy/paste all the transformations frome the previous query into this new query. If further changes are required on the original query, I do not want to have to go to the other query and repeat it ... though it probably is not that big of a deal, unless I forget.
Thanks in advance for any thoughts on this.
2 Replies
- amitchandak
Super User
jusTodd , this seems a little bit different, if this can help
https://powerbitalks.com/2020/06/data-from-latest-file-folder-power-bi.html
This is a video from Matt, may be same solution you already have - https://exceleratorbi.com.au/load-the-latest-version-of-a-file-in-power-query/
- jusTodd
Advocate IV
Thanks for the response. I appreciate your thoughts. I read through those two articles and they are indeed the very same thing I already implemented. Not finding anything else on the webs, maybe I will send this over to the Microsoft team as enhancement request. Surely, I am not the only one out there with this need.
Thanks again!