2 Replies Latest reply on Nov 21, 2013 12:35 AM by Gorazd Ozimek

    YTD percentage calculation giving me headaches

    Gorazd Ozimek

      Hi,

       

      I've tried to do this calculation on my own, however it seems like I will need some help on this one. I am trying to do a manual calculation (not a quick calculation through menus), which would calculate YTD share of product sales. Here is what I would like to achieve (see last table).

       

      Monthly salesJanFebMarAprMay
      Product 11011141312
      Product 23035253223
      Product 32023123424
      YTD salesJanFebMarAprMay
      Product 11021354860
      Product 2306590122145
      Product 320435589113
      YTD percent ofJanFebMarAprMay
      Product 116,7%16,3%19,4%18,5%18,9%
      Product 250,0%50,4%50,0%47,1%45,6%
      Product 333,3%33,3%30,6%34,4%35,5%

       

      I've already made a similar calculation based on moving 3 months total share of products, which works for that purpose, but I don't know how to adjust it to show YTD percentage:

      WINDOW_SUM(SUM([Sales]),-2,0)/WINDOW_SUM([Total Sales],-2,0)

       

      (The above formula includes [Total Sales] which is actually another calculation: TOTAL(SUM([Sales]))

       

      Any clues?

       

      Thanks!

      Gorazd