0 Replies Latest reply: Oct 14, 2013 8:58 PM by doron tamir RSS

    how to solve accumulative issue


      hi,

      the records are look like this:

      d

      branchdoctordays from todayfree time minutes
      aa115
      aa130
      aa290
      aa360
      bc160
      bc230
      bc

      2

      40
      bd490

       

      by branch and doctor I need to show the average(avg)  of the closest X free turn larger then Y minutes

      for example for

      X=3

      Y=30

      doc a in branch a its (1+2+2)/3=1.66 (1=its for the second row,2+2 its the next two chunks of 30 min from the row of 90 minutes free.

      for doc c in branch b its (1+1+2)/3=1.3

      for doc d in branch b its (4+4+4)/3=4

      X and Y are input fields!!

      and can be changed by the user online.

       

      so whay needed is accumulative calculations on the fly on this records...

       

      to get the results like this:

      branchdoctoraverage free day from today
      aa1.66
      cb1.3
      bd4

       

       

      you can imagine that the real data is thousands of doctors and like handers of branches...

       

       

      thanks for any help

       

      Doron