Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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,

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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
MVP
MVP

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.