Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have the expression:
IF(GetSelectedCount(date)=0,
Sum({<consecutive= { $(=MAX(consecutive)-1)} >} field1),
(Sum(field1))
)
I have dates, and the rule is:
if there is no one selected, sum field1 by the max date
if there one or more than one date selected, sum field1 by that dates.
The code ots ok with the rule, but, its slos, and i think if I can do it all in set analysis will be faster than now.
Thanks!!
Thank you for the answers!
I have solved it! But i didnt say thats it was in qlik sense....
I create a variable:
=if(GetSelectedCount(date) = 0, '$(=Max(consecutive))', concat(distinct consecutive,','))
And in the expression I call it:
Sum( {< consecutive= {$(=myvar)} >} field1)
Its SO MUCH FASTER!
Thanks everybody!!
It's probably slow because with this kind of expression you are calculating both results every time. See How Not to Choose an Expression | Qlikview Cookbook for an explanation and solutions.
-Rob
It's better you use two expressions and put enable condition like GetSelectedCount(date)=0.
It will be faster.
Thank you for the answers!
I have solved it! But i didnt say thats it was in qlik sense....
I create a variable:
=if(GetSelectedCount(date) = 0, '$(=Max(consecutive))', concat(distinct consecutive,','))
And in the expression I call it:
Sum( {< consecutive= {$(=myvar)} >} field1)
Its SO MUCH FASTER!
Thanks everybody!!