Forum Discussion
flowgistics
5 years agoFrequent Visitor
Filter column if Source.Name corresponds to Source.Name in last row
Hi everyone, I'm not looking through M-code that well yet and hope that somebody can help me with my problem: I'm importing .txt files through folder import, but only want the latest report to b...
- Anonymous5 years ago
Hi flowgistics
Have been very busy lately. So you have all the files in one folder like this? And you want the archive data file and the latest version of xyz? Are you going to use the Date created or the date in filename to identify the latest version?
here is one using Date created
let Source = Folder.Files("folderpath"), #"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Name],"archive") or [Date created] = List.Max(Source[Date created])) in #"Filtered Rows"
flowgistics
5 years agoFrequent Visitor
are my descriptions not comprehensible or is the problem too tricky that no solution can be found? 🤔