Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
cyberblitz
New Contributor

Filter (Set Analysis)

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??

2 Replies
MVP
MVP

Re: Filter (Set Analysis)

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.



cyberblitz
New Contributor

Re: Filter (Set Analysis)

Thanks, however your suggestion mirrors exactly what my first attempt looked like and it didn't work and i can't figure out why..