3 Replies Latest reply: Mar 27, 2012 9:21 AM by jenghardt RSS

expression for "New Customer"


Hi all,

I'm looking for a expression where I get a COUNT of "New Customer" back. The definition of "New Customer" is as follow. Each customer, which buy a product in 2012 but NOT has bought it in 2011 is a "New Customer".

Fields in my model:
Jahr (Year)

I tried it out with the following expression:
COUNT({$<CustomerName = p({$<Jahr={2012}>} CustomerName) - p({$<Jahr={2011}>} CustomerName)>} CustomerName)

I get values but it seems the number of customers are to low.

Thanks for your help!


  • expression for "New Customer"
    Juan Vitantonio

    I tested the function and it works with no problem. Are you sure you are getting a wrong number of count??

    • Re: expression for "New Customer"

      Hi alfasierra,

      thanks for your support. I tested again and with set filter the figures are correct. Now I want to add to the rule the fact only if sales > 146. My actual expression is like this:


      COUNT({$<CustomerName = p({$<Jahr={2012},ArticleClass={Clothes}>} CustomerName) - p({$<Jahr={2011},ArticleClass={Clothes}>} CustomerName)>} CustomerName)


      How I can add the rule only if sales is bigger than 146?


      Thanks & Kind regards


  • expression for "New Customer"
    Andrea Stacca


    =if ( aggr(sum( {$<year= {$(=Only(2012)     )}>} Sales),Client) > 0 ,

    if ( aggr(sum( {$<Year= {$(=Only(2012)     )}>} Sales), Client , 0 , 1) , Client)  < 0 , Client ) 


    then suppress null value in dimension