Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vlad_komarov
Partner - Specialist III
Partner - Specialist III

Grouping the data

Hello,

I have a data table that contains set of events (Enter and Exit) and corresponding date stamps for each one of them.

This is an example of RAW data:

Event Date TimeEvent DateIDEvent
1/1/10 5:12 AM1/1/20103250536Enter
1/1/10 5:23 AM1/1/20103250531Exit
1/1/10 5:38 AM1/1/20103250289Enter
1/1/10 6:08 AM1/1/20103250490Enter
1/1/10 6:15 AM1/1/20103250536Exit
1/1/10 6:40 AM1/1/20103250628Exit
1/1/10 7:15 AM1/1/20103250490Exit
1/1/10 7:52 AM1/1/20103250605Enter
1/1/10 8:25 AM1/1/20103250289Exit
1/1/10 8:50 AM1/1/20103250289Enter
1/1/10 8:54 AM1/1/20103250289Exit
1/1/10 12:09 PM1/1/20103250289Enter

Each ID handles at least one pair of events per day (for example for ID = 3215028):

11/19/10 5:48 AM11/19/20103215028Enter
11/19/10 4:38 PM11/19/20103215028Exit
11/20/10 5:44 AM11/20/20103215028Enter
11/20/10 12:07 PM11/20/20103215028Exit
11/22/10 5:44 AM11/22/20103215028Enter
11/22/10 5:42 PM11/22/20103215028Exit

I need to calculate the difference between Exit and Enter event per ID per period of time.

I was trying to group these records together during the data load, but was unable to do so.

What's the best way to do it? I would appreciate an expert suggestion.

Best regards,

VK

1 Solution

Accepted Solutions
Not applicable

Hi,

Hope i have understood your question.

Pl look at the attached application.

In my application i have seggregated "Event Date Time" into two time like Enter_Time and Exit_Time using Peek() function.

Hope this helps you.

- Sridhar

View solution in original post

2 Replies
Not applicable

Hi,

Hope i have understood your question.

Pl look at the attached application.

In my application i have seggregated "Event Date Time" into two time like Enter_Time and Exit_Time using Peek() function.

Hope this helps you.

- Sridhar

vlad_komarov
Partner - Specialist III
Partner - Specialist III
Author

Thanks! I've used your approach and my script is working properly now.

Regards,

VK