3 Replies Latest reply: Mar 27, 2018 8:14 AM by Petter Skjolden RSS

    Need sum of if column

    Anil Kumar

      Hi All,

       

      I am struck in a situation where I need to show sum of a column in straight table of Qliksense.

      Below is the expression.

       

      if(Above(Total if(column(1)>column(6),

      if(MonthName(MonthEndDate) = Monthname($(vselectedDate)) , Day(DATE_INVOICE_DATE)

      , if(Num(MonthEndDate) < $(vselectedDate) , Day(MonthEndDate))),

      (column(1)-column(6))/column(2)

      ))<0,0,

      if(column(1)>column(6),

      if(MonthName(MonthEndDate) = Monthname($(vselectedDate)) , Day(DATE_INVOICE_DATE)

      , if(Num(MonthEndDate) < $(vselectedDate) , Day(MonthEndDate))),

      Fabs((column(1)-column(6))/column(2))

      ))


      Output of this statement is:-

      ------------------

                -

      ------------------

              21

              28

              3.3

               0


      I want the sum of these lines at top.


      Thanks in advance.


      Regards,

      Anil