2 Replies Latest reply: Jun 16, 2011 6:22 PM by Courtney Johnson RSS

    Chart expression - combine 3 ifs

      I am new to QlikView, so I may just be missing something obvious here, but I could use some help.

       

      I am trying to create a chart that has a branch number, and then its trend based on whether the current month is greater/less/equal its 6 month average.

       

      I currently have Branch as a Dimension, and then Trend as 3 seperate Expressions:

       

      Trending Up:   if(Persistency>6MoAvg,'Up')

      Trending Down:  if(Persisentcy<6MoAvg,'Down')

      Trending Same:  if(Persistency=6MoAvg,'Same')

       

      So I get something like:

       

      Branch     Trending Up         Trending Down     Trending Same

      1               Up                      -                         -

      6               -                         Down                  -

      9               -                          -                        Same

       

      But I want to combine these in to one Expression just called Trending and get something like:

       

      Branch    Trending

      1             Up

      6             Down

      9             Same

       

      I'm having trouble figuring out how to do if,if,else instead of just if,else - if that makes sense.    B/c I have three cases, but I want to combine them.

       

      I am sure this is just some simple syntax I'm not thinking of / being able to find.  Any suggestions?