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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join field from Tbl2 into Tbl1 by EmpID and Date Range

Tbl1 Contains dates and tasks that employees clocked onto a task. Tbl2 contains historical data on what department the employee worked on and what the date ranges were that they worked in that department. An employee could have switched departments several times while being employeed at this company. I am trying to pull in the department the employee was working on at the time they clocked onto a task.

Tbl1:

TaskDate, EmployeeID, Task

Tbl2:

EmployeeID, department, StartDate, EndDate

I want a table that has TaskDate, EmployeeID, Task, and Department where the EmployeeID's match and the TaskDate is between the StartDate and EndDate.

Tbl1 and Tbl2 are loaded and would be considered resident but I am not sure how to make this happen in QV.

Thanks!

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Eric,

Take a look at this post on how to do that.

Hope that helps.

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

INTERVALMATCH is the type of load that can help with your problem - look up the syntax in the Help section

Not applicable
Author

I am still having difficulty getting this to work. I need Department joined into Tbl1. Can I do this with IntervalMatch as well? Below is my syntax for the interval match but I am receiving a Field not found error even though I have checked my spelling and case for each field.

IntervalTbl:

IntervalMatch(TaskDate,EmployeeID) Load StartDate, EndDate, EmployeeID Resident Tbl2;



Miguel_Angel_Baeyens

Hello Eric,

Take a look at this post on how to do that.

Hope that helps.