11 Replies Latest reply: Mar 7, 2017 1:48 PM by Maria Harmening RSS

    while loop in expression or help for multi-dimensional combo chart

    Maria Harmening

      can I put a while or a for loop into an expression?

       

      I'm trying to make a multi-dimensional combo chart (qlik unfortunately doesn't seem to support it).  I'm trying to trick it then do conditional formatting.

       

      for (i = 0; endIterator = 2; i + 1)

       

      If( i = 1, Count(distinct {$

      <BINFlagMonth={1}>} {$<[Emp Type]={'P'}>

      }
      BIN), Count(distinct {$

      <BINFlagMonth={1}>} {$<[Emp Type]={'F'}>

      }
      BIN)
      )

       

      My main dimension is month, and I have 2 measures that I'm displaying,  so by month, I'm trying to display total positions available for Parttime v Fulltime (measure one) and the actual staffed parttime v fulltime positions (measure two).. making 2 distinct bars per month and two sub categories within each.

       

      can i do this?  please say that it's possible!