8 Replies Latest reply on Aug 16, 2018 2:21 AM by Okechukwu Ossai

    Discount Analysis per customer

    varun kalra



      I wanted to classify a customer based their discount usage on a monthly basis. If the customer is using a discount code in any selected month , the customer should be classified as "discount voucher user" else "Non voucher user".


      For eg.  a Customer id:  2049 made purchase on 28/03/2018  (basket id 1028678), 19/Jul/2018 (basket Id 1087469) and 26/07/2018 (basket Id 1090871) using a discount code and the rest of times without using a discount code. If I select month of July this customer should be classified as "discount voucher user" (because he made at-least one purchase in the last month using discount). I tried using LOD calculations for eg. if { FIXED [Customer ID ]: COUNTD([Discount Code])}>0 then 'discount voucher user' else 'Non voucher user' END , but it is not taking the selected month into account.


      This calculation would help me analyse how many unique customers used discount vouchers v/s non users of discount vouchers.


      Any help would be appreciated. Thanks in advance