Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
darren_dixon
Contributor III
Contributor III

Travel time between two appointments

Hi

I am trying to calculate the time between the End Time of the first appointment and the Start Time of the second appointment.

All columns are fields except time taken which is an expression of: sum(End Time-Start Time)

Time.jpg

Hope you can help.

Thanks,

Darren

2 Replies
Gysbert_Wassenaar

If the start times are ordered you can use [Start Time] - above([End Time]). The caveat is that this will simply pick the End Time of the row above. It does not take into account date changes or changes of Operative. It may be better addressed in the load script using the previous or peek function. It's easier to order the data and make sure that the travel time isn't calculated over the day changes or other changes of operative.


talk is cheap, supply exceeds demand
darren_dixon
Contributor III
Contributor III
Author

Hi Gysbert,

Unfortunately this has not worked. The dates and start times aren't in any order and a sort is required on the Straight table to put them in order