Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jharke
Creator II
Creator II

Linking time interval between stop_timestamp and next start_timestamp

Goodmorning,

In our warehouse, employees pickup goods from location X and bring them to location Y.

When they start with such an Order, a Start_Timestamp is generated and assigned to that specific Order.

When the Order is brought to location Y, a Stop_Timestamp is created.

Lets say Order_123 started at 18:37:46 and stopped at 18:39:57 = 131 seconds

Next order = Order_ABCD, started at 18:40:31

Now I want that the time between stopping Order_123 and starting Order_ABCD will be added to the 'previous' Order_123 (under a special label, e.g. 'walking back time').

So when selecting Order_123 in qlikview, I want to see a field with 131 seconds 'processing' + another field with 34 seconds 'walking back time'. (Maybe also the timestamp 18:40:31 as ultimate_Timestamp of this order.)

(Per employee thousands of this orders per month).

1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

Hi, why don't you do it at a script level? You could use the Peek function to obtain the value from order ABC and then you can store in a separate field in order 123

I tend to find that working on the data model makes it easier rather than working on the charts

View solution in original post

2 Replies
lorenzoconforti
Specialist II
Specialist II

Hi, why don't you do it at a script level? You could use the Peek function to obtain the value from order ABC and then you can store in a separate field in order 123

I tend to find that working on the data model makes it easier rather than working on the charts

jharke
Creator II
Creator II
Author

Thank you for putting me in the correct direction.

Also thanks to Stefan Wühl in: How to find previous and next record from a table? | Qlik Community

I have to use PEEK and then order DESCENDING in order to find the NEXT value in an ascending ordered list.

For those who want an example, see attached.

Also note here again as well in other threads: Order By is not possible when loading a QVD or Excel: then you have to use a Resident Load (as in Example).