1 Reply Latest reply on Nov 27, 2018 6:33 AM by Jim Dehner

    Top Three Purchases per Client

    Andrea Clerico



      I am trying to monitor the purchases of my clients. All of them have a precise ID. Every time they come to my store they might purchase a product (or more) or they might decide to just have a look.

      Every client can purchase a maximum of 6 products each time they come. In my dataset the clients and the products are visualised in this way:



      I would like to extract the top three products that each client buys. For instance the output will be:



      Of course, the NULL will not be taken into consideration.


      I am attaching a workbook with an example dataset.


      Thank you in advance for your help.