Hi everyone,
I'm trying to check of one date is included if any of the dates periods in another dataset. For example:
Employee ID | Date |
11 | 2022-02-12 |
11 | 2022-05-18 |
11 | 2021-11-12 |
11 | 2023-02-01 |
Employee ID | Start Date | End Date |
11 | 2022-02-01 | 2022-05-01 |
11 | 2022-05-01 | 2022-05-28 |
11 | 2023-01-01 | 2023-02-15 |
12 | 2022-01-01 | 2022-05-28 |
22 | 2022-07-01 | 2022-07-05 |
As you can see above, not all employee dates in dataset#1 included in any of the periods in dataset#2, and that's ok. but for the ones are included I need to flag them!
I've tried to do join by the Employee ID, but it gives me all the records all together (couldn't compare the data in one row) to flag the records I wanted. because it line me with the date x all the periods and that is not right.
Please help.
Thank you.
Solved! Go to Solution.
Can you please share how the output format should be.
It helps to create the workflow as your desired output.
Many thanks
Shanker V
In other words, I want the result to be:
Employee ID | Date | Flag |
11 | 2022-02-12 | Yes |
11 | 2022-05-18 | Yes |
11 | 2021-11-12 | No |
11 | 2023-02-01 | Yes |
@ShankerV You are a life saver! Thank you so much