5 Replies Latest reply: Dec 23, 2013 2:27 AM by Paolo Guidolin RSS

    Calculate deviation from the average value

    Paolo Guidolin

      Hi, I have a table like this


      ITEMDAYUMVOL

      AVERAGE 

      DEVIATION FROM AVERAGE 

      0050307/01/2013KG80308,4166667-228,4166667
      0050308/01/2013KG110 -198,4166667
      0050309/01/2013KG210,5 -97,91666667
      0050310/01/2013KG80 -228,4166667
      0050311/01/2013KG430 121,5833333
      0050322/01/2013KG940 631,5833333
      0050701/01/2013KG910420,4166667489,5833333
      0050704/01/2013KG430 9,583333333
      0050717/01/2013KG70 -350,4166667
      0050718/01/2013KG362,5 -57,91666667
      0050721/01/2013KG670 249,5833333
      0050722/01/2013KG80 -340,4166667


      and for each item I need to calculate in a pivot table the deviation from the average value.


      In the pivot I use then expression

      sum(

        VOL -

       

        (

             sum( TOTAL VOL) /

             (

                  $(data_fin) - $(data_ini)

             )

        )

      )

       

      and it works correctly if i select only one ITEM, but does not work if I select two item.

      Can someone help me?

       

      Thanks