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

Difference between two dates - 1

verde0903
8 - Asteroid

Hello,

 

I need assistance with determining how to write a formula that calculates the comparison between the start and end date of a contract minutes 1 day.  In the attached example, I would need the formula to bring in if the new contract starts January 1st, bring me back the contract that ended the day before.  In other words, compare End Date and Start Date - 1.  The result would be Contact No. 123.

 

Regards,

Maylen

3 REPLIES 3
Prometheus
12 - Quasar

@verde0903 I used a Multi-Row Formula tool with this expression: 

if datetimediff([Start Date], [Row-1:End Date],'days')=1

then [Row-1:Contract No]

else null()

endif

Last Contract.PNG

verde0903
8 - Asteroid

Thanks Bolide I just ran the solution proposed but it will brought back both lines.  I am looking for it to only bring back one line.

Prometheus
12 - Quasar

@verde0903 You can filter out the nulls using the Filter tool.

Filter out nulls.PNG

Labels
Top Solution Authors