Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

How to get IntervalMatch Working Correctly

I am having trouble getting my IntervalMatch function to work properly. I have posted my script below.

My end goal is to join the %SessionKey% from the Actions table to the Sessions table. I am trying to do this by first matching the Action Timestamp to the correct Session_Start and Session_End Interval. I need to add a key to the IntervalMatch in order to make the records more unique, which is why %IntervalKey_Actions% and %IntervalKey_Sessions% were created. Once the correct timestamp and key are associated on the Sessions table I want to then left join in the %SessionKey%. When I run my script below I get two synthetic tables. Any help on how to solve this would be appreciated. Thanks!

Actions:

LOAD

      tmpDate&'-'&UPPER([Action Document])&'-'&UPPER([Action User]) as %IntervalKey_Actions%,

      [Action Timestamp],

      %SessionKey%

Resident tmp2_Actions;

Drop table tmp2_Actions;

Sessions:

LOAD

     Session_Date&'-'&UPPER(Document_Name)&'-'&UPPER(UserId) as %IntervalKey_Sessions%,

     Session_Start,

     Session_End

Resident tmpSessions;



IntervalMatch:

     Intervalmatch([Action Timestamp],%IntervalKey_Actions%)

     Load Session_Start, Session_End, %IntervalKey_Sessions% as %IntervalKey_Actions%

Resident tmpSessions;

Drop Table tmpSessions;

1 Solution

Accepted Solutions
Highlighted
Contributor III
Contributor III

This was an oversight on my part. I had two keys in one table which was causing duplication of records on the Session table after the IntervalMatch.

View solution in original post

2 Replies
Highlighted

please post some sample data and your expected result

thanks

regards

Marco

Highlighted
Contributor III
Contributor III

This was an oversight on my part. I had two keys in one table which was causing duplication of records on the Session table after the IntervalMatch.

View solution in original post