Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Group by?

Does anybody know how I only show the last/biggets value in a column, grouped by name. My table looks like this:

I only want to see the sonny de boer with the name p-5089 in this table. Now I see him 2 times.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi,

     

     Difficult to work out exactly how to Group correctly as I dont know the full data set, but you could try the below (used the sample data you gave above)

     

    From this...

     

    To this...

    = Table.Group(#"Changed Type", {"Name"}, {{"Name2", each List.Max([Name2]), type nullable text}, {"Last Placement", each List.Max([Last Placement]), type nullable text}})

     

     

    Hope that helps.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

     Difficult to work out exactly how to Group correctly as I dont know the full data set, but you could try the below (used the sample data you gave above)

     

    From this...

     

    To this...

    = Table.Group(#"Changed Type", {"Name"}, {{"Name2", each List.Max([Name2]), type nullable text}, {"Last Placement", each List.Max([Last Placement]), type nullable text}})

     

     

    Hope that helps.