Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
wood
Contributor III
Contributor III

Multiple condition matching

hello everybody,

How to easily implement the following scenario in the script editor:
T2. Logic_year needs to be matched from t1,

Matching conditions:
T2. Name = t1.name   and  t2. Date <=t1.end_date and t2. Date >=t1.start_date

t1:

namestart_dateend_datelogic_year
a2011/06/012011/07/312011
a2011/8/12012/3/312012
a2012/4/12013/10/312013
b2011/06/012011/07/312022

 

t2:

nameDATEyearlogic_year
a2011/06/0220082011
a2011/06/3020082011
a2011/07/0420082011
a2011/09/2120082012
a2011/09/2220082012
a2012/02/1120082012
a2012/05/1020082013
a2013/06/0420082013
b2011/06/0220082022
b2011/06/3020082022
    
    

 

thanks

1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

You need to use the IntervalMatch() function.  After loading the 2 tables add this:

inner Join IntervalMatch (DATE, name, logic_year)
Load start_date, end_date, name, logic_year
Resident t1;

 

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

You need to use the IntervalMatch() function.  After loading the 2 tables add this:

inner Join IntervalMatch (DATE, name, logic_year)
Load start_date, end_date, name, logic_year
Resident t1;

 

wood
Contributor III
Contributor III
Author

thank you very much!