community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Logic using dates

Meteor

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?

Alteryx Certified Partner
Alteryx Certified Partner

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