Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Logic using dates

Highlighted
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?

Highlighted
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