9 Replies Latest reply on Feb 8, 2019 8:59 AM by Don Wise

    Calculation requires chronological order

    Diane Nash

      I have been tasked with creating a report that shows the average time taken between a surgery ending and the next one beginning by hospital. In order to do the calculation I must find the average time between the previous case end time and the next case start time for same physician, hospital, operating room, date. Below is an example set of data.


      So for the first physician, the average time is 45 minutes since it took 1 hour to start case 2 (10:30AM-9:30AM,) then 30 minutes to start case 3(11:30AM-11:00AM.) Is it possible to do this type of calculation in Tableau, since the calculation requires that the records be in correct chronological order? I'm pretty sure this is my first time posting on this forum, so please let me know if I can better explain my issue.


      PhysicianHospitalOperating RoomCase #
      Start Time
      End Time


      Hospital ARoom 1111/25/2018 7:30AM 11/25/2018 9:30AM
      Dr.AHospital ARoom 12
      11/25/2018 10:30AM
      11/25/2018 11:00AM
      Dr.AHospital ARoom 13
      11/25/2018 11:30AM
      11/25/2018 12:15PM
      Dr.BHospital BRoom 21
      11/25/2018 10:30AM
      11/25/2018 11:00AM
      Dr.BHospital BRoom 22
      11/25/2018 12:15PM
      11/25/2018 1:15PM
      Dr.BHospital BRoom 23
      11/25/2018 1:45PM
      11/25/2018 4:00PM


      Thanks for the help!