Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Check if a date of one dataset is there in another dataset

MonaAlmutairi
8 - Asteroid

Hi everyone,

 

I'm trying to check of one date is included if any of the dates periods in another dataset. For example:

 

Employee IDDate
112022-02-12
112022-05-18
112021-11-12
112023-02-01

 

Employee IDStart DateEnd Date
112022-02-012022-05-01
112022-05-012022-05-28
112023-01-012023-02-15
122022-01-012022-05-28
222022-07-012022-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.

5 REPLIES 5
ShankerV
17 - Castor

Hi @MonaAlmutairi 

 

Can you please share how the output format should be.

It helps to create the workflow as your desired output.

 

Many thanks

Shanker V

MonaAlmutairi
8 - Asteroid

In other words, I want the result to be:

 

 

Employee IDDateFlag
112022-02-12Yes
112022-05-18Yes
112021-11-12No
112023-02-01Yes
MonaAlmutairi
8 - Asteroid

@ShankerV Sure, please see my reply below the post

 

Thank you.

ShankerV
17 - Castor

Hi @MonaAlmutairi 

 

One way of doing this.

 

ShankerV_0-1680590427017.png

 

Many thanks

Shanker V

 

MonaAlmutairi
8 - Asteroid

@ShankerV You are a life saver! Thank you so much

Labels