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