Forum Discussion
melina
9 years agoHelper IV
Query editor filter the latest date
Hi All, In my query editor, i have several of files. The files are naming based on <plant_filename_date> In the query editor, there are files from the same plant but different date. Can i h...
- 9 years ago
You can Group By plant with operation "All Rows" and then adjust the generated code to have the maximum date selected.
let Source = Table1, #"Grouped Rows" = Table.Group(Source, {"Plant"}, {{"AllData", each Table.Max(_,"Date"), type record}}), #"Expanded AllData" = Table.ExpandRecordColumn(#"Grouped Rows", "AllData", {"FileName", "Date"}, {"FileName", "Date"}) in #"Expanded AllData"
MarcelBeug
9 years agoCommunity Champion
So now you are asking me where you can find the filenames?
That feels like the world upside-down.
It is your data, so you should know where the filename is located.
Otherwise please share a screenshot that shows your column with filenames.
Are you sure you selected this column before splitting by underscore (_)?
Or did you just copy and paste my code somewhere into your query?
That ain't gonna work, that's why I created a video to illustrate the step to take.
melina
9 years agoHelper IV
Ok, i got the solution..!
Sorry and thanks!:smileyhappy: