Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Simple multi row formula

Hamder83
11 - Bolide

Hi 

I am loading all customers agreements into my flow.

Lets say one customer gets a new agreement every year.

Then every time i load a new agreement, I want to set end date of the previous agreement to the start date of the new.

ive attached sample data, and how I filled my muti row forumla, but I am missing something...

 

Hamder83_0-1631188151434.png



Hamder83_1-1631188167928.png

 



Thanks in advance,


4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @Hamder83 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1631188639500.png

 

1. Using sort tool sort by customer, sort start date by descending.

2. Using multi-row formula groupby customer and take previous row start date.

 

Hope this helps : )

 

AngelosPachis
16 - Nebula

Hi @Hamder83 ,

 

Maybe you can use a multi-row formula tool to get the value on the previous row if your dataset is sorted in a descending chronological order.

 

AngelosPachis_0-1631188725625.png

 

Grouping on customer ID or customer name will make the multi-row calc restart for each unique customer ID so no need to use an If statement

 

 

Christina_H
14 - Magnetar

Your formula looks good to me, except for a spelling error at the end!  Change ENIDF to ENDIF

messi007
15 - Aurora
15 - Aurora

@Hamder83 ,

 

Please see below :

 

messi007_0-1631188892069.png

 

Attached the workflow,

Regards,

Labels
Top Solution Authors