8 Replies Latest reply: May 19, 2016 6:29 AM by Stefan Wühl RSS

    Set Analysis - using min function with a condition

    Swetha More

      Hi Experts,

       

      I am trying to count the numbers of customers who got converted in the same year they first bought the product. Here the conversion is customers who bought certain amount of units, this value is provided by the user and stored in a variable "vUnits".

       

      The Dimension is FirstOrderYear and the expression is

       

      count({<FirstOrderYear={'=$(=year(Min({<qty={'>=20'}>}date_invoice)))'}>}partner_id)

       

      Basically to put it simply, count of all the customers where the FirstConversionYear is equal to FirstOrderYear where FirstConversionYear is Min({<qty={'>=$(vUnits)'}>}date_invoice)

       

      This expression does not seem to give me the correct result set. I have tried with other combinations like Aggr, Firstsortedvalue, etc but none of them work.

       

      Any suggestions would help. Thanks

       

       

      Thanks

      Swetha