Skip to main content
Announcements
Document boards are being consolidated, this board no longer allows NEW documents READ MORE

Intervalmatch example – with dates

cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Intervalmatch example – with dates

Last Update:

Sep 21, 2022 5:11:51 PM

Updated By:

Sue_Macaluso

Created date:

Mar 6, 2018 4:47:31 AM

I have two tables Table1,Table2. Table1 has DATE, Table2 has START_DT,END_DT. Want to join these two tables on DATE columns.Intervalmatch function will help us to make the join in Qlik. If we use left join, we can avoid synthetic tables too. Here is the example.If you want to test, prepare the test data.
Let me know if you need any more info/clarification.
Table1:
LOAD COUNTRY,
DATE,
C1,
C2
FROM Table1;
Table2:
LOAD COUNTRY, C3,C4,
date(START_DT) as START_DT,
date(END_DT) as END_DT
FROM Table2;
Final_Table:
INTERVALMATCH (DATE) left JOIN LOAD START_DT, END_DT RESIDENT Table2;
left Join (Table1) LOAD distinct * RESIDENT Table2;
DROP TABLE Table2;

Tags (1)
Labels (3)
Comments
Anonymous
Not applicable

Thanks for the example, works superb!

0 Likes
qlikviewwizard
Master II
Master II

@Anonymous

Nice to hear. Please mark the correct Answer.

0 Likes
sudeep78
Contributor II
Contributor II

Hi @qlikviewwizard ,

I came across this post while struggling to get Intervalmatch() to work in Qlik Sense. Your solution worked very well for me. Thank you for this.

Now for a follow-on question. Both data tables have millions of rows of data and I get error code 129 (out of memory) while executing the load script. Could you recommend an approach to use your solution for such large volumes of data?

Happy to provide additional details if it would help.

Thank you in advance,

Sudeep

0 Likes
Version history
Last update:
‎2022-09-21 05:11 PM
Updated by: