1 Reply Latest reply: May 18, 2012 1:04 PM by Nicole Smith RSS

    Expression help

      Hi All,

       

      I have an expression which is as follows:

       

      (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6,7}>}Max_Points) - this works for me

       

      where Qlikview Line num's are line numbers in a straight table. I want this line to be modified in such a way so that the logic is as follows:

       

      If(month= Jan)

      then

      (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6/*,7*/}>}Max_Points)  --- Commenting out Line 7

      elseif (month=Feb)

      then

      (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6/*,7*/}>}Max_Points) --Commenting out Line 7

      elseif( month= Mar)

      then

      (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6,7}>}Max_Points)

       

      and so on...

       

      How can this expression be written in Qlikview

       

      Appreciate all your help in Advance

       

      Thanks,

      tutan

        • Expression help
          Nicole Smith

          If(month= Jan, (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6/*,7*/}>}Max_Points),

          if(month=Feb, (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6/*,7*/}>}Max_Points),

          if(month= Mar, (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6,7}>}Max_Points))

           

           

          If you want to put an "else" at the end (I'm just going to use sum(Max_Points)), it would go in like this:

           

          If(month= Jan, (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6/*,7*/}>}Max_Points),

          if(month=Feb, (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6/*,7*/}>}Max_Points),

          if(month= Mar, (sum({<Qlikview_Line_num={ 1,2,,3,4,5,6,7}>}Max_Points), sum(Max_Points))