4 Replies Latest reply on Jul 10, 2018 4:31 AM by Joana Priou

    How to get a purchase count per order 1

    Joana Priou

      Hi,

       

      I managed to get the repeat purchase rate by doing a fixed LOD expression but this is giving me the total purchase made by a customer (so I can split my database by made 1 purchase, made 2 purchase, made 3 purchase etc).

       

      Now what I want to know is being able to qualified each purchase to say if it is the person first purchase, the person second purchase, the person third purchase etc.

      E.G:

       

      Customer ID
      Purchase DateTransaction IDPurchase number
      CUSTA1/1/2018TRACUSTAJAN1
      CUSTB1/1/2018

       

       

      TRACUSTBJAN

      1
      CUSTC1/1/2018

       

       

      TRACUSTCJAN

      1
      CUSTA1/5/2018TRACUSTAMAY2
      CUSTA1/10/2018TRACUSTAOCT3
      CUSTB1/4/2018TRACUSTBAPRIL2
      CUSTC1/4/2018TRACUSTCAPRIL3
      CUSTC1/5/2018TRACUSTCMAY4
      CUSTC1/10/2018TRACUSTCOCT5
      CUSTC1/9/2018TRACUSTCSEPT6

       

      I would like to have this data for the purchase number. Note that I am looking for a fixed formula as I will use this data to filter some data or to two create graph (I will for example look at people that purchase product A as their first purchase, which product do they purchase for their 2nd purchase and so on.

       

      I can't find a way of doing it.