I have a main EVENT table. For each event I have an EventID (unique key) and several attributes including EventDate (datetime) and EmpID (foreign key).
I need to associate the EMPLOYEE table but the employee attributes change over time so this table is SCD type 2. Thie means for each EmpID I have a OpenDate, CloseDate and CurrentFlag (1 if this is the current record, 0 if else). The unique key for this table is a sequence number.
The 2 tables should be associated based on the EmpID and the date (EVENT.EventDate between EMPLOYEE.OpenDate and EMPLOYEE.CloseDate).
Each employee is updated on a different schedule based on its attributes, so each employee has 1 or more records.
For example, EmpID 123:
The 2 first records for this EmpID in EVENT should be associated to the first EmpID record in EMPLOYEE.
The 3rd record in EVENT should be associated to the 3rd record in EMPLOYEE.
And this is an older article on Qlik Community - although it refers to QlikView everything is relevant to Qlik Sense since the load script language and data model architecture is almost 100% identical between the products: