community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Iterative marco looping to check for condition

Atom

Hello,

 

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 

 

 

Claims.PNG

Highlighted
Nebula
Nebula

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.

 

Wf.png 

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.

 

Results.png

 

Dan

Labels