Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm Trying to ascertain a precentage with applied conditions using set analysis and i can't figure it out.
i started with this:
Count({$<if(isnull(round(CompAxTimeSince / 60, 0.01)),'NOT DONE',round(CompAxTimeSince / 60, 0.01))={'NOT DONE'}>}CompAxTimeSince) / Count(UrNumber)
Didn't work, then i tired placing "if(isnull(round(CompAxTimeSince / 60, 0.01)),'NOT DONE',round(CompAxTimeSince / 60, 0.01))" into a variable and it works great on its own but when applying it to a set analysis, nope:
Count({$<$(vCompAx_TimeSince)={'NOT DONE'}>}CompAxTimeSince) / Count(UrNumber)
Why won't it work??
The reason your set expression won't work is because you don't stick to the allowed syntax of a set expression.
In the position of the set expression modifier which is $(vCompAx_TimeSince) in your case, the $-sign expansion of the variable vCompAx_TimeSince has to return the name of a field. Nothing else is accepted at the beginning of a set modifier before an = (or -=, /=, +=,*=).
Your variable would expand into this:
Count({$<if(isnull(round(CompAxTimeSince / 60, 0.01)),'NOT DONE',round(CompAxTimeSince / 60, 0.01))={'NOT DONE'}>}CompAxTimeSince) / Count(UrNumber)
Then QlikView would try to evaluate this expression that is not a valid syntax.
Thanks, however your suggestion mirrors exactly what my first attempt looked like and it didn't work and i can't figure out why..