Forum Discussion

MT88's avatar
MT88
New Member
3 years ago
Solved

Compare rows in different columns

Hi @ everyone,   I have a table with dublicates in two different columns and a third column which got a date. I want to compare the rows in the first two columns (where the duplicates are) and if ...
  • AlB's avatar
    3 years ago

    MT88 

    You need to read the table in correctly in Excel. Assuming the data is formatted as table and named "Tabelle3", as in the xlsx you have shared:

    let
        Source = Excel.CurrentWorkbook(),
        Tabelle3 = Source{[Name="Tabelle3"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Tabelle3,{{"Mitarbeiter", type text}, {"Kurs", type text}, {"Ablaufdatum", type date}}),
        #"Grouped Rows" = Table.Group(#"Changed Type", {"Mitarbeiter", "Kurs"}, {{"Ablaufdatum", each List.Max([Ablaufdatum]), type date}})
    in
        #"Grouped Rows"

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.