2 Replies Latest reply: May 22, 2013 11:23 AM by Marco Rieben RSS

    sum of rows aggregation for subtotal

    Marco Rieben

      Dear QlikView community,


      My issue is that I am trying to take into account the volumes of the different years for the price quality expression. I have enclosed my files, which might make it easier to comprehend the crux.


      These are the steps that I am undertaking:

      1. Calculate unitary prices (sales / volume) for both years, only taking into account prices of materials, which exist in both years. ==>works fine

      2. Volume 2012 * Unitary Price 2011 (this column will then be used to calculate the overall price quality) . ==> works fine

      3. Difference (2012 sales - Volume 2012 * Unitary Price 2011) ==>please see the different subtotals

      4. Price Quality (Difference / Volume 2012 * Unitary Price 2011) ==>given that QV takes the wrong difference subtotal, my result at subtotal level is incorrect.


      I should really get an aggregation on the difference column, which I could reuse for the Price Quality calculation.


      My overall price quality for this scenario, as defined by step 4, should not be 8.70% (this is just from Excel) but rather:

      1'300 / 4'785 = 27.20%



      Material20112012Realization2011 Volume2012 VolumeUnitary Price 2011Unitary Price 2012Volume 2012 * Unitary Price 2011Difference (expression total) - wrongDifference (sum of rows) - correct Price Quality (wrong)Price Quality (correct)


      Any help is greatly appreciated.