3 Replies Latest reply: Jul 6, 2014 2:13 PM by Gil Lion RSS

    PROBLEM - Math Adding On Script Brings Wrong Result

      My script has this syntax:

       

      CALCULATED_LINE_COSTS:

       

        load  [ID],

         COST_GAS,  COST_DEPR,  COST_MAIN,  COST_HWY,  COST_ADMIN, COST_SALARY,

        (COST_GAS + COST_DEPR + COST_MAIN + COST_HWY + COST_ADMIN + COST_SALARY) As  [TOTAL_COST]

        resident  table_10_3;

       

      ===========================

       

      In qlikview pivot chart, i have an expression- SUM(TOTAL_COST)

      The result of it is wrong!

       

      If I create expression summing all costs like this- SUM(COST_GAS) + SUM(COST_DEPR) + ..... and so on.

      The result is correct.

       

      Why is the script adding won't work.

       

      Help!!