3 Replies Latest reply: Mar 3, 2015 3:41 PM by Marcelo Costa RSS

    Trend based on Moving average

      Dear colleagues.

       

      I want to create a trend line based on moving average. I created the following moving average formula which is woking fine, except for the periods after the last one which has a value, since it is considering, in this example, Sept, Oct, Nov and Dec as '0'.

       

      Here's the formula I'm using:

      =IF(vTipoInfo = 'Mensal',RANGESUM(TOP(sum(IF(ANO_EVO=ANO and MES_EVO <= MES,num(META_INDICADOR_EVO,'.###,'))), 1, ROWNO())) / ROWNO())

       

      But the behavior I need is what I tried to show through the dotted line.

       

      I look forward to reading your replies!

       

      Regards,

      Marcelo