2 Replies Latest reply: Feb 16, 2018 11:23 PM by David Moore RSS

    Filter (Set Analysis)

    David Moore

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

        • Re: Filter (Set Analysis)
          Petter Skjolden

          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.