Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time Calculation

Hi,

During a data load I need to create a turnaround time from a dataset.  In the example below, there is a distinct session id for a particular date.  Within this session there are three units and by my calculation the average turnaround time for these three units is 49.5 mins.

turnaround_data.PNG

Is it possible to create a field that calculates these turnaround times?

Many thanks for any help,

1 Solution

Accepted Solutions
sunny_talwar

May be like this

LOAD *,

          If(Session = Previous(Session), RangeSum([Time Started], -Previous([Time Finished]))) as [Turnaround Time]

Resident .....

Order By Session, [Time Started];

View solution in original post

2 Replies
sunny_talwar

May be like this

LOAD *,

          If(Session = Previous(Session), RangeSum([Time Started], -Previous([Time Finished]))) as [Turnaround Time]

Resident .....

Order By Session, [Time Started];

Not applicable
Author

thank you - works perfectly.