Forum Discussion

flowgistics's avatar
flowgistics
Frequent Visitor
5 years ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    5 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"