Hello!
I have a dataset, where I have used the Summarize tool to count different weather type during a day (Storm, Fog, Cold, Snow etc.). I would like to keep the Type where the count is the largest.
My dataset
Date | Count | Type |
2016-01-02 | 4 | Cold |
2016-01-02 | 41 | Fog |
2016-01-02 | 2 | Snow |
2016-01-02 | 3 | Cold |
2016-01-03 | 1 | Cold |
2016-01-03 | 17 | Fog |
2016-01-03 | 4 | Snow |
Expected outcome:
Date | Count | Type |
2016-01-02 | 41 | Fog |
2016-01-03 | 17 | Fog |
Thank you in advance!
Hey @rxak, to do this you can just conduct a join back with the main data set based on the date and the max count equalling the count:
Hey @rxak
Here is the quickest way to do it!
First you can use the summarize tool to find the max number of records per group (date) and then use this to join back to your original data set using both date and count as join attributes.
Hope this helps!