Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
anseglko
Creator
Creator

Calculate time between two entries after filtering them

I need to calculate time between two entries. There entries should be filtered first by "equipment". Then the time should be calculated if the current entries' above and below entries are smaller than the current entry. Let me show you:

This is my unfiltered table:

1.png

"Turn" is calculated if start_pos-above(start_pos)>0 and start_pos-below(start_pos)>0. "Interval" is just current time-above(time).

However both the turn and the interval-columns are incorrect because they are calculated across every equipment. This can be solved by filtering by equipment:

2.png

Now the turns are shown correctly. I need to calculate the time between two turns. The "Interval" column only works if I manually select all the "turn=1" entries (after which the turn-column doesn't work anymore):

3.png

 

Is all of this possible to calculate in the interval field without any filtering? Something like "Check the entry above, if the equipment numbers are the same, check the above and below start_pos fields of that entry. If those are smaller than the current start_pos field, calculate the time interval between current entry and that entry."  Probably needs some complicated aggregation but I haven't gotten it to work.

Labels (6)
0 Replies