17 Replies Latest reply: Mar 22, 2011 2:02 AM by Iassen Ivanov RSS

    Growth of unit price / percentage of evolution. It looks simple but....

      Hello,

      It looks easy on the paper, but how do you do produce such table?

      I have a dimension [Stat] which contains the value M, M-1, YTD, YTD-1

      I am creating a AsOf table to easily calculate those statistics (http://community.qlik.com/forums/t/41759.aspx)

      Sales & Qty are expression such as:

      Sales: Sum({${$<[As of Month]=SliderMonth>}Sales)

      Qty: Sum({${$<[As of Month]=SliderMonth>}Qty)

      UnitPrice: Sales / Qty

      1st question: How do I add 2 extra member (%Growth_M and %Growth_YTD) to my dimension [Stat]?

      Calculation for Growth members are (M - (M-1))/(M-1) and (YTD - (YTD-1))/(YTD - 1)

      Am i going to adjust the expression Sales & Qty to answer to that?

      2nd (remark): I need to make sure that the growth of Unit Price is calculated correctly;

      - it should be (UnitPrice(M) - UnitPrice(M-1))/UnitPrice(M-1)

      - and not %Growth_M(Sales) / %Growth_M(Qty) ==> totally wrong

      error loading image

      How to do that? Thanks in advance,