cancel
Showing results for 
Search instead for 
Did you mean: 

Filter to get max value from each group?

SOLVED

Filter to get max value from each group?

i have a dataset where i need to get the max from each group, is there a tool that can help me do this?

input

keycolumn1column2
1red3
2red4
3green7
4green8
5blue6
6blue2
   

 

desired output:

keycolumn1column2
2red4
3green8
5blue6
3 REPLIES 3

Filter to get max value from each group?

i have a dataset where i need to get the max from each group, is there a tool that can help me do this?

input

keycolumn1column2
1red3
2red4
3green7
4green8
5blue6
6blue2
   

 

desired output:

keycolumn1column2
2red4
3green8
5blue6
marcusblackhill
12 - Quasar

Re: Filter to get max value from each group?

Hey @matthew_swanson !

 

You can do it with summarize tool, groupby the column 1 and select column 2 to get the max.

 

Hope that helps!

Re: Filter to get max value from each group?

@marcusmontenegro Almost. ive managed to get the summarize tool to return the max value for each group, but i cant figure out how to make it return the key for that row.. the value itself is only going to be helpful if i know which row it came from

Highlighted

Re: Filter to get max value from each group?

Gotcha, see if that attached example helps

Attachment
Download this attachment