Start Free Trial

Alteryx Designer Desktop Discussions

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

How to generate a date from the end date of a previous row

APAlteryx
6 - Meteoroid

 I am trying to create a flow where when I have rows that have some same elements e.g., (Record ID, Project, Construction Type) and has two different records for [Door Install Date]  (1and 3), that the [Door Install Date] "1"  end date will take the start date of [Door Install Date] "3" and enter that into a new column called [New End Date].     So for the record 23, Project Green:  [Door Install Date] "1" has a [New End Date]  of "1/1/2025" which is the Start Date o Record 23, Project Green [Door Install Date ] "3".    For records where it is only one record, or the project is reflecting  [Door Install Date] = 3, (e.g., Record #27), the [New End Date] will just copy the existing [End Date]. 

 

Can someone help me to tackle this?  I was trying the summarize tool  but am drawing a blank now.  Than you in advance!

 

Record IDProjectConstruction TypeDoor Install DateStartEndDifficulty 

New End Date

 

23

GreenDoor111/1/20242/5/2025Standard

1/1/2025

23

GreenDoor31/1/20255/5/2025Standard

5/5/2025

25

YellowDoor16/6/202310/11/2023Hard

11/1/2023

25

YellowDoor311/1/20231/5/2025Hard

1/5/2025

27

BlueDoor12/15/20229/1/2024Hard

9/1/2024

 

3 REPLIES 3
apathetichell
20 - Arcturus

I'd use a multi-row formula.

new datatype (new end date)

values that don't exist sould be set to null()

group by Record ID

 

if [Row+1:Start]=null() then [End] else [Row+1:Start] endif

 

 

AnnaMikhaylova
9 - Comet

Hi @APAlteryx,

 

You should be able to accomplish this by using multi-row formula tool:  

 

Solution 2.PNG

APAlteryx
6 - Meteoroid

Thank you both for this solution, this is exactly what I was looking for! 

Labels
Top Solution Authors