7 Replies Latest reply: May 24, 2013 9:25 AM by Alessandro Bettica RSS

    pls help me for expression - solved

    Alessandro Bettica

      Hi guys, i've a problem on creating a chart table, i need to calculate the intervall between two dates, one on current record and the other one on the previous record for the same code, this is an example of data source :

       

      code     datastart         

      1          20/01/2013    

      30        18/01/2013    

      1          15/01/2013   

      1          13/01/2013    

      20        08/01/2013    

      30        08/01/2013    

       

      My chart table shoud be :

       

       

      Dimension  :code

      Expression : avg(datastart-datastart prev*)

       

      datastart prev is the previous value of datastart of previus record for the same code

       

      i.e.(by code)

       

      Code 1 :

       

      avg of 20/01/2013 - 15/01/2013  / 15/01/2013 - 13/01/2013

       

      Code 30 :

       

      avg of 18/01/2013 - 08/01/2013

       

      Code 20 :

       

      avg of 08/01/2013 - 0

       

      I hope is clear.

       

      Thx a lot.

      Bye.