6.12 Filter by maximum or minimum value within a group (find out one for each group)

 

We have an Excel table for the daily sales of products:

imagepng

The code below is to find out the product with the largest daily sales and its sales:

=spl("=E(?1).group(OrderDate).(~.maxp(Sales))",A1:C2401)

imagepng


esProc Desktop and Excel Processing
6.11 Use group’s aggregation value when filtering
6.13 Find out interval in which a certain condition occurs continuously