Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Logic using dates

hash_89
8 - Asteroid

Hello,

 

I have a data which looks like this.

ProductEventDate
1A2019-01-02
1B2019-04-06
1C2019-06-04
2D2019-05-08
2E2019-06-02

 

I want to write a logic which says if current date is between any two dates for a product, then it is current, else it is future and also provide a date based on the type of event.

 

Output should look like this:

Eg: 

For Type:

Today's date lies between Event B and Event C for product 1, Hence the type is 'current'
Today's date lies before event D date for Product 2, hence the type is 'future'

 

For date:

If the type is 'current' then, date = 'Today's date'

If type = 'future', then it has to take the first date for that product and add 1.

 

ProductTypeDate
1Current2019-04-08 
2Future2019-05-09

Can someone help me how to proceed on this?

1 REPLY 1
Thableaus
17 - Castor
17 - Castor

Hi @hash_89 

 

Would this work?

 

Workflow23812903.PNG

 

Let me know if you have any doubts in the logic part of the workflow. I made some assumptions about what you said.


Cheers,

Labels
Top Solution Authors