15 Replies Latest reply: Apr 28, 2009 10:56 AM by rey-man RSS

    Subtotals in Pivot don't calculate correct


      Hi all,

      i've got an expression which calculates if the budget is greather than the reality.

      If so, it should calculate is, else take 0.

      So far it works. But in the pivot table, the subtotals miscalculate.

      I found a post regarding a same sort of problem. (http://community.qlik.com/forums/p/15624/60908.aspx#60908)

      Only the dificulty with this one, is that is should calculate if the sum is greather than another sum and not the keyfigure itself.

      Can somebody help me?

      Tnx in advance.



      (if(sum(budget.budget) - sum(facts.real) >0,

      sum(budget.budget)) - sum(facts.real),