Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
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
MVP & Luminary
MVP & Luminary

Re: Split records - clock items per interval

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


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
MVP & Luminary
MVP & Luminary

Re: Split records - clock items per interval

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


talk is cheap, supply exceeds demand

View solution in original post

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