We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Comparing date with unique id, and to test if they fall within the date range

Ininsmelly
6 - Meteoroid

Hello guys, I am currently working on a school project, where i have two files as below:

 

File 1: i have a list of unique id, and one unique id would have  one or multiple dates with it (or you can think as the unique ID is the membership number, and the date is when they visit the gym, so every unique id could have multiple date assigned to it)

 

File 2: i have a list of unique id with start and end date, and same as above, one unique id could have multiple date ranges.


Therefore, with the above two file, i would need to know if there are any data from file 1 of each unique id, failed to fall into the date bucket (range) as recorded in file 2.


i am having a trouble when mapping the unique ID of both file while considering the dates and the ranges.

 

any help is greatly appreciated, thanks a lot!!!

8 REPLIES 8
binuacs
21 - Polaris

@Ininsmelly  can you provide some sample data and expected output

Ininsmelly
6 - Meteoroid

Ininsmelly_0-1661216786998.png

An example of the data would be like the above, and the highlighted column would be the desired outcome. Thanks a lot!

Ininsmelly
6 - Meteoroid

Any solution for this🥲

Kakuffo
Alteryx
Alteryx

Hi @Ininsmelly  in this situation i would utilise the Generate rows tool to create an entry for each unique id with every date within the range
Then using a join tool  perform the join between the list of all dates and the actual entry dates, this way all matches between date rangers per ID will come out of the join and all mis matches will not then summarize and count per uniqueID or a formula tool to mark the check column "Y"

Mock up incoming but id this makes sense give it a try!

 

Ininsmelly
6 - Meteoroid

Hello @kakuffo, many thanks for your help, let me try with the generate row function. Thanks a lot!!!

Kakuffo
Alteryx
Alteryx

hey @Ininsmelly please see my mock up here. if this solves please mark the post as a solution

Many Thanks

binuacs
21 - Polaris

@Ininsmelly One way of doing this

 

binuacs_0-1661295360425.png

 

Ininsmelly
6 - Meteoroid

Thank you guys, you guys are the legend!

Labels
Top Solution Authors