6 Replies Latest reply: Aug 15, 2014 6:16 AM by Stefan Hofmann RSS

    SUM + IF

    Stefan Hofmann

      Hello all,


      have a big problem with calculating a percentage of the two marked columns. I would like to show the percentage in a Text Box but since the column on the right side is calculate with an if clause, QlikView won't let me do this.


      The column "Zielererichung" looks as follows:

      if((sum(tt_rueck) / sum(TKE_Wert)) >= 1, sum(tt_anwesend), 0)


      Column "Anwesend" is just: sum(tt_anwesend)


      If I create a text box and try to calculate the percentage:

      =num(100 / (sum(if((sum(tt_rueck) / sum(TKE_Wert)) >= 1, sum(tt_anwesend), 0))) / sum(tt_anwesend))

      I get the message:

      Error: nested aggregation not allowed


      I can not get the total fro "Zielerreichung" from the script, the result does not match with what I get in the chart


      any idea's