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

How to use Multirow tool to select a set of timeframe for the latest continuous enrollment

vtng
5 - Atom

Hi, I would like to populate a set of the latest Start_date and End_date where the each student has no gaps in enrollment. There are multiple records of Student_ID with several enrollment dates. I added a multirow tool to calculate the datediff between the latest Start_date (of the first row) - End_date (of the second row). I am trying to get the first instance where the DateDiff field is greater than 1 and exclude the rest of the records after it but if the first row is > 1 (like Student_ID A003), then keep the latest row. Then take the min(start_date) and the max(end_date)? Not sure if I am making any sense. I am stuck at the workflow attached to this post and not sure the best way to do next. 

 

FYI, End Date=3999 meaning the student is still enrolled in school. 

 
 
sample_date_diff.PNGsample_date_diff_result.PNG
4 REPLIES 4
abacon
12 - Quasar

@vtng image.pngI believe you were overcomplicating this. Just use a summarize tool, group on the student ID, grab the Min start date and the Max end date and that will get the output in the screenshot you posted.

vtng
5 - Atom

Sorry, if I am not being clear. I need to get the latest continuous enrollment date with no gaps. 

A0022022-06-012025-04-30

A002 should reflect this date and not 2002-02-01 because she/he has a gap in enrollment date of 32 days between their very 1st enrollment and their 2nd enrollment

abacon
12 - Quasar

@vtng Got it, this workflow has a few changes and it gets the desired output you mentioned.

vtng
5 - Atom

This works, great! Thank you so much for the help!

Labels
Top Solution Authors