0 Replies Latest reply: May 14, 2013 4:26 AM by li123456 RSS

    linest_m() and aggr() Calculation problem

      Hello! I have problem with the following expression of linest_m() and aggr():

       

       

      LINEST_M

      (
           total aggr(

                RangeSum(
               above(
                     sum(if(TYPE=TYPE_01 ,1,0))  

                ,0, RowNo())
                )
           ,
      DT_TIME_05)

      ,DT_TIME_05

      )

       

      The aggr() cumulates the result of sum() with DT_TIME_05. Actullay, this does return a result but the result is not correct, which means it does not correspond  the regression line drawn by:

       

        RangeSum(
               above(
                     sum(if(TYPE=TYPE_01 ,1,0))    

       

                ,0, RowNo())
                )

       

      I think the problem might be that aggr() returns a group of datas that are not in order of DT_TIME_05

      Does anyone have any idea about this problem?  Thank you so much for your response!!!