Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How can i create Date Recency's? Ex. 0-6 Months, 7-12 months etc..

jdelaguila
8 - Asteroid

Good morning everyone!

 

Still fairly new with Alteryx and I have a project i can't quite figure out. 

 

I have a file with dates that range from today going back to 1995.  

 

I need to create RECENCY field based off the most recent date received by my client. So if today is 6/4/2020 i need to make sure that "0-6 Months" is from 6/4/2020 - going back to 12/4/2020 - and so forth going all the way back.

 

Below is an example of the field RECENY that i'm trying to create based off of the field DATE.

 

** Recency is based off of today's date 6/4/2020.  This date will change from month to month **
DATERECENCY
5/6/20200-6 Months
2/21/20200-6 Months
2/14/20200-6 Months
2/11/20200-6 Months
2/10/20200-6 Months
12/17/20190-6 Months
11/26/20197-12 Months
10/1/20197-12 Months
9/5/20197-12 Months
4/2/201913-18 Months
11/11/201819-24 Months

 

I'm thinking i would need a tool to create the below, and than maybe i can link this back to my data to update the RECENCY field?

Recency_DescStart_DateEnd_Date
0-6 Months12/4/20196/4/2020
7-12 Months6/4/201912/3/2019
13-18 Months12/4/20186/3/2019
19-24 Months6/4/201812/3/2018
25-30 Months12/4/20176/3/2018
31-36 Months6/4/201712/3/2017
37-42 Months12/4/20166/3/2017
43-48 Months6/4/201612/3/2016
49-54 Months12/4/20156/3/2016
55-60 Months6/4/201512/3/2015
61-66 Months12/4/20146/3/2015
67-72 Months6/4/201412/3/2014
73-78 Months12/4/20136/3/2014
79-84 Months6/4/201312/3/2013
85+ Months6/4/19206/3/2013

 

Any ideas on what the best solution for this would be? What tools you would recommend i use?  Any thoughts would be greatly appreciated. Thanks as always!  Javier

9 REPLIES 9
rupali_bhise
8 - Asteroid

Hey @jdelaguila ,

 

Will really appreciate if you can provide sample data. 

 

Thanks 

BrandonB
Alteryx
Alteryx

This workflow dynamically generates the mapping table based on the dates that you are feeding into it. Take a look and let me know what you think!

 

 

months mapping table.png

rupali_bhise
8 - Asteroid

Hey @jdelaguila ,

 

Attaching workflow and screenshot for your reference, I guesses summarize tool works for you with Min & Max function on date column.

Date Recency.png

 

Good Luck

jdelaguila
8 - Asteroid

BrandonB  - thank you this what i was looking for! Still trying to figure out how it works, but it is giving me the results i need.

 

I've been trying to integrate some sort of Interface tool that lets me input in a CurrentDate as my CurrentDate could change at anytime - for example instead of 6/4/2020 (today) i may need to enter in 6/2/2020 or 5/27/2020. 

 

I'm still watching videos on Macros and Interface tools so still haven't created one successfully.  If you have any quick fixes for that part i would be greatly appreciative. Thank you for all your help, i owe you!

 

Javier 

 

BrandonB
Alteryx
Alteryx

The date that is used as a reference point is right here:

 

current date.png

 

Right now it always pulls in the current date as the point of reference, but another date could be put in here and used in the same way

jdelaguila
8 - Asteroid

Brandon thanks again for all the information. If i can bug you for one last question to your workflow?

 

The End Range and Begin Range have 1 day where they overlap. 

 

If you see below 0-6 months and 7-12 months has 1 day where they overlap - 12/4/2019.

For 7-12 months and 13-18 months it overlaps with  - 6/4/2019.

 

I've been killing myself trying to figure out how to do the math - any thoughts?

 

So ideally 7-12 months begin range would start with 6/3/2019 and so on going down.

 

end rangebegin rangemonth range text
6/4/202012/4/20190-6 months
12/4/20196/4/20197-12 months
6/4/201912/4/201813-18 months
12/4/20186/4/201819-24 months

 

Once again thanks a bunch for all the help.  

Javier

BrandonB
Alteryx
Alteryx

You can edit the filter logic here to determine which one you want. It sounds like you want the second part of the formula to say [DATE]<[end range] instead of [DATE]<=[end range] 

 

filter logic.png

jdelaguila
8 - Asteroid

Brandon - i owe you a drink! Maybe if i see you at the next Alteryx Conference! 

Javier

BrandonB
Alteryx
Alteryx

Happy to help and I can’t wait for our next conference! Still enjoying all of the virtual work with our customers, but seeing you all in person and hearing everyone’s stories about what they have built is so rewarding.

 

I’ll be there!

Labels