Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
cyberblitz
Contributor II
Contributor II

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
petter
Partner - Champion III
Partner - Champion III

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
Contributor II
Contributor II
Author

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