Alteryx Designer Desktop Discussions

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

Creating a Conditional Loop in Alteryx?

tsilverman_
7 - Meteor

Hello,

 

    I am trying to figure out how to go about solving a question in Alteryx. I believe it would involved a loop or an if then statement, but not sure how to do it. 

 

I need to basically go through each individual, find there "start Date" which is one column, and then look at another column showing an event date and a cost associated with it. I then need to calculate the total cost from within 6 months before start date, as well as total cost within 6 months after start date. 

 

I need to combine two documents, first on their names, however, in one document the names include a middle name letter. So I will need to find a way to combine on names, and date of birth. Also the DOB's are in a different format from the two documents

 

Then mapping each individual to their start date.  Then looping through the event dates to sum the total amount within 6 months before the program start date and then another loop summing the amount within 6 months after the start date. 

 

Sample documents have been attached

 

3 REPLIES 3
DawnDuong
13 - Pulsar
13 - Pulsar

Hi @tsilverman_ 

From the description it sounds like this can be solved via batch and/or iterative macros.

have you tried before? If you are new to macros in Alteryx, the interactive lessons under Alteryx academy is a very good start, covering from concept to example.

dawn 

tsilverman_
7 - Meteor

Hi @DawnDuong 

     I have tried, however, I am having trouble for this specific use case

MatthewO
Alteryx
Alteryx

@tsilverman_ you may be able to get to the solution without a loop if I am understanding correctly. The date calculations occur inside the Formula tool and the respective columns are summed in the Summarize tool. 

image.png

Labels