Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
CustomerName
Jahr (Year)
Sales
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!
Jürgen
I tested the function and it works with no problem. Are you sure you are getting a wrong number of count??
dimension:
=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
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
Jürgen