Returning name of top customer per group

Hi, 

I have some data with Date, Product type (chairs, tables), Customer Name, Order Sum 

From this I want to create a view that shows:

Date  - Category  - Top Customer based on order sum 

July 2022 - Chairs - Bob 

July 2022 - Tables - Theresa

July 2022 - Carpets - Mary 

June 2022 - Chairs - Lena

June 2022 - Tables - Theresa 

One customer can be present in many or all categories, but no order mixes categories. I.e. its always only chairs, or tables or whatever. 

Im semi new to looker but what I was hoping to do was something like

Case(when (order=max(order), Customer name))

This doesnt work however because it only returns the name for one row, the largest order across all categories.

Very thankful for any help or guidance! 

Thank you 

0 0 43
0 REPLIES 0
Top Labels in this Space
Top Solution Authors