Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Split records - clock items per interval

Hi QlikView Guru's,
I am wondering how i can split and calculate records in my load script.
Example:
I have two records like this:
datetime starttime endtotal secondsemployee ID
2012-12-0109:15:0011:15:007200101
2012-12-0110:20:0012:20:007200265
After loading this record I want this as output
datetime starttime endtotal secondsemployee ID
2012-12-0109:15:0010:00:002700101
2012-12-0110:00:0011:00:003600101
2012-12-0111:00:0011:15:00900101
2012-12-0110:20:0011:00:002400265
2012-12-0111:00:0012:00:003600265
2012-12-0112:00:0012:20:001200265
This way I can sum the total seconds per time interval.
It would be great if someone can solve this puzzle.
Thanks a lot for helping me out.
Greetings, Dave
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Split records - clock items per interval

See attached qvw (adapted from this solution, credits due swuehl)


talk is cheap, supply exceeds demand
2 Replies
Gysbert_Wassenaar
Not applicable

Re: Split records - clock items per interval

See attached qvw (adapted from this solution, credits due swuehl)


talk is cheap, supply exceeds demand
Not applicable

Re: Split records - clock items per interval

Thanks Gysbert,

This is really great! I am able to continu my dashboard .

Also thanks to Swuehl.

Greetings, Dave