Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
i would like to get the number of customers (see expression) for the year before the selected one
I tried some set analysis but results is always 0
2015 : 3
2016 : 4
thx for your help !!
May be this
=Count({$<year = {$(=year-1)}>} DISTINCT If(Aggr(Sum({$<year={$(=year-1)}>}sales), salesman, id_customer, year) > 0, id_customer))
May be this
=Count({$<year = {$(=year-1)}>} DISTINCT If(Aggr(Sum({$<year={$(=year-1)}>}sales), salesman, id_customer, year) > 0, id_customer))
Thnaks sunny !! perfect
Try to write
=count( {$<year={$(=Max(year)-1)}>} distinct if(aggr(sum({$<year={$(=Max(year)-1)}>} sales),salesman,id_customer,year)>0,id_customer))
If you not click on the Year field you did not get any thing on the chart you need dynamically change in expression then use Max in the Expression.
=count( {$<year={$(=Max(year)-1)}>} distinct if(aggr(sum({$<year={$(=Max(year)-1)}>} sales),salesman,id_customer,year)>0,id_customer))