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.
SOLVED

Calculation Date until Future

KlaudiaF
5 - Atom

Hi All :)

I am not able to find any solution in the community. Could you please help me with creation formula: 

I have some  initiate dates (a lot of), for example these below and I need formula which will be calculating following Expected Date according to the rule: 

Expected Date =  Initiate Date + (365*n) until Expected Date will be greater or equal today 

 

5 REPLIES 5
jdminton
13 - Pulsar

See if this answers your question. I think I'm understanding, but let me know if it is something different.

KlaudiaF
5 - Atom

Not exactly, this result it is not matching to my requirements 

Initiate Date Expected Date
2021-12-25 2022-12-25
2022-01-13 2023-01-13
2022-11-29 2023-11-29
2023-04-21 2024-03-06
2023-06-28 2024-03-06
2023-10-31 2024-03-06
2024-01-15 2024-03-06

Expected Date are in the past, which cannot be  in my cases (I forgot mentioned that n is always integer)

For example for 1st date it should be: 2021-12-25 + (365*n) > Today so n = 3 

For 3rd date it should be: 2022-11-29 + (365*n) > Today so n= 2

And for last date it should be 2024-01-15 + (365*n) > Today so n=1

I have difficulties with define n in Alteryx as  any integer...

jdminton
13 - Pulsar

I think I understand. See this new workflow.

KlaudiaF
5 - Atom

I don't think about to first calculate N, exactly this what I would like to achieved. 

Many, many thanks! :)

cgadijol471
5 - Atom

sample

Labels
Top Solution Authors