2 Replies Latest reply: Apr 30, 2013 9:46 AM by Anand Krishna RSS

    Trendline using linest_ function within a range

    Anand Krishna

      Hi Experts,

           I have the following data:

      MonthYearSalesQty
      Jan-1310000
      Feb-1311000
      Mar-1315000
      Apr-138500
      May-130
      Jun-130
      Jul-130
      Aug-130
      Sep-130
      Oct-130
      Nov-130
      Dec-130

      I am using the following expression to get trendline:

      LINEST_M(TOTAL aggr(sum(SalesQty),MonthYear),MonthYear)*MonthYear + linest_b(total aggr(sum(SalesQty),MonthYear),MonthYear)

       

      This takes even the zero values of salesqty and plot the trend (which give not the very best trend).

       

      Is is possible to specify in linest_m and linest_b function to take only the range from Jan-2013 to April-2013 into account for plotting the trendline?

      OR

      If there is any other way, please answer.