Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following expression which works :
Sum(Aggr(Sum(NO_OF_TCKTS),WOFY,State,Store,Department))
I am trying to incorporate the below if statement into the above expression:
if(Sum({<Qlikdate4={'Mon'}>}NO_OF_TCKTS)/Sum(NO_OF_TCKTS)<0.02,1,0)
Any ideas?
Thanks
The rule of thumb is to have a single aggr(). I guess it would be something like:
Sum(Aggr(
if(Sum({<Qlikdate4={'Mon'}>}NO_OF_TCKTS)/Sum(NO_OF_TCKTS)<0.02,1,0)
,WOFY,State,Store,Department))
Try to create a flag in the script like below
if(Sum(if(Qlikdate4='Mon',NO_OF_TCKTS))/Sum(NO_OF_TCKTS)<0.02,1,0) as flag
then use this as expression
Aggr(Sum(if(flag=1,1,0)),WOFY,State,Store,Department)
The rule of thumb is to have a single aggr(). I guess it would be something like:
Sum(Aggr(
if(Sum({<Qlikdate4={'Mon'}>}NO_OF_TCKTS)/Sum(NO_OF_TCKTS)<0.02,1,0)
,WOFY,State,Store,Department))
Thanks.