Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table that looks something like below:
EmpID, LocationID,PositionID,StartDate,EndDate
1, A, 3, 1/23/2022, 3/5/2022
1, B, 3, 3/5/2022, -
2, A, 3, 7/14/2022, 12/01/2022
2, A, 1, 12/01/2022, 12/30/2022
3, A, 3, 4/17/2022, 6/03/2022
3, A, 3, 6/03/2022, -
I am trying to count distinct Employee IDs (EmpID) that have a valid EndDate in a given month, e.g.:
Assume Employees can only hold one Position at a time and can be located at only one Location at at time.
Does anyone have ideas on how to approach this problem?
You need to resolve your start/end-dates to single dates and linking it to a master-calendar. A missing end-date could be replaced by today() or similar. For this you could use an IntervalMatch - Qlik Community - 1464547.