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

Looping multiple connectors

wags1
5 - Atom

Hello,

 

I am trying to 'loop' two connectors - is there a way to do this within Alteryx? 

 

Essentially I have a dataset where I need to add time based on the previous row (which I've done in the multi row formula connector), however the following row is based on the calculation from the current row, so in order to get this to work I could repeat the two connectors multiple times but I am hoping there is a much smarter way to do this.

 

Workflow attached as well as my example input and output spreadsheets to help show what I'm trying to do in case my description isn't overly clear.

 

Any help would be really appreciated!

 

Thanks

 

Example output:
excel output1.png

 

Example output showing formulas:

excel output2.png

4 REPLIES 4
Warcry
9 - Comet

Use two multi-row formulas: 

 

1. Formula: IF [Flag] = "FIRST" THEN [Depart_midnight] ELSE [Row-1:depart_updated] endif

 

2. Formula: IF [Flag] = "FIRST" THEN [Depart_midnight] + [travel_time]ELSE [Row-1:depart_updated] + [travel_time] endif

 

 
 

 

Warcry
9 - Comet

If this solves it, please accept my answer as the solution, thank you.

wags1
5 - Atom

Thanks Warcy for the reply. I must still be doing something wrong as when I put those in, it only calculates for the second row in the sequence. Would you mind sharing your workflow so I can troubleshoot mine?

Warcry
9 - Comet

Make sure your columns that you want to add are not string columns. 

Screenshot 2025-03-05 222249.png

Labels
Top Solution Authors