Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Iterative marco looping to check for condition

5 - Atom



I am new to Iterative marco or Any marco, I am trying to Build something that checks the dates for eligibility.


If In_date_1 is less then Out_date_1 then this is NOT Eligible, that mean this Claim is Out, how ever there are multiple Ins and Outs for a Claim, example would be (highlighted) Claim is in 2018-08-06 and out 2018-08-09 and In 2019-04-19 so this is consider Eligible. there are also claim that go Ins and Outs Multiple times ( Maybe up to 6 times to both Ins and Outs) is there a way to check for Eligibility ?


I have also attached the full data set below


thank you 




17 - Castor
17 - Castor

Hi @PengJia 


Assuming your data is sequential, i.e. In-date_2 is not before Out-Date_1, then a simple workflow will answer your question.



Transpose the data to get all the type In/Out in one column and the dates in another.  Remove the null dates and sort the remaining by claim and date.  Use the Sample tool to retrieve only the last record for each claim.  If the name contains Out  then its "Not eligible", otherwise it is.