0 Replies Latest reply: Apr 15, 2018 9:37 AM by Saloni Bhatia RSS

    Loyalty Points dashboard

    Saloni Bhatia

      I have a situation wherein I want to show the latest membership type and cumulate all points of that member against it rather than cumulating it against all membership types it had in that specific period

      eg:

      say I have below table:

       

         

      member_no membership_code Join_date Reg_date Change_date purchase_amt
      12abc Silver 2018-04-08 2018-04-10 2018-04-10 100
      12abc Gold 2018-04-08 2018-04-10 2018-04-11 100
      12abc Gold 2018-04-08 2018-04-10 2018-04-13 50
      12abc Platinum 2018-04-08 2018-04-10 2018-04-14 100
      13abc Silver 2018-04-09 2018-04-10 2018-04-10 200
      13abc Gold 2018-04-09 2018-04-10 2018-04-13 200
      13abc Gold2018-04-09 2018-04-10 2018-04-14 200

       

       

       

      if someone selects date= 2018-04-11

      Then data should look like below

       

         

      membership_code purchase_amt
      Silver200
      Gold200
      Platinum0

       

       

      if someone selects 2018-04-14 then data should look like

         

      membership_code purchase_amt
      Silver0
      Gold600
      Platinum350

       

       

       

      all cumulative points of the member going against latest status only. Also, one can select just 2 dates then cumulative points of those 2 dates will go against the latest membership_code as of that date