Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
morganaaron
Specialist
Specialist

IntervalMatch Multiplying Records

Hi all,

I'm currently trying to use an IntervalMatch to join Start/End Timestamps to Event timestamps. The 'Session' table has the SessionID, UserName, DocumentName and SessionStart and SessionEnd timestamps.

My task table has a number of distinct fields, but also contains the DocumentName and UserName, as well as the Event timestamp.

I'm attempting to use an IntervalMatch table to simply return the start and end points of the session that each task belonged to, but due to having users/documents this has to be unique to each user on each document.

I was using:

IntervalMatch(Timestamp, UserName, DocumentName)
Load
SessionStart,
SessionEnd
Resident Sessions;

Which works fine unless the User has multiple sessions, where it then loads a record of each event against every possible start/end for that user, regardless of the fact that the task didn't exist in that timeframe.

The tables above are joining on User and DocumentName, is it the join(s) that's causing the issue? I've tried using a composite key but it caused the same errors.

Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try adding the fields that should be used for matching the intervals too:


IntervalMatch(Timestamp, UserName, DocumentName)
Load
SessionStart,
SessionEnd,

UserName,

DocumentName
Resident Sessions;


Look up the IntervalMatch (Extended Syntax) entry in the Qlikview help file for more information.




talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Try adding the fields that should be used for matching the intervals too:


IntervalMatch(Timestamp, UserName, DocumentName)
Load
SessionStart,
SessionEnd,

UserName,

DocumentName
Resident Sessions;


Look up the IntervalMatch (Extended Syntax) entry in the Qlikview help file for more information.




talk is cheap, supply exceeds demand
morganaaron
Specialist
Specialist
Author

Ah, knew it was simple...thanks Gysbert - I'd read it a few times, but had somehow missed the fact that Key was referenced at the end of the field load, blame it on lack of coffee..

AlexChirkin
Contributor II
Contributor II

A lot of thanx Gysbert!