Alteryx Designer Desktop Discussions

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

Invoice Aging Date Range

MOlinski
7 - Meteor

Hello, was wondering if you had an idea for this last column. So we currently have a column that looks at the invoice date and spits out the year, but we would like to have a general comment for anything that is 6 years or older. So for example, since we are running this in 2024, the comment would be 2018 and Prior, but when we run this in 2025, we would like it to say 2019 and Prior.

 

 

Invoice DateYearAging
2024-05-2720242024
2023-04-1520232023
2024-06-0520242024
2024-07-2920242024
2016-05-0120162018 and Prior
2015-05-0120152018 and Prior
2 REPLIES 2
griffinwelsh
12 - Quasar

@MOlinski use this formula to generate your aging column. Please mark the thread solved if this works for you.

 

if datetimediff(datetimenow(),[Invoice Date],"years") >= 6 then datetimeformat(datetimeadd(datetimenow(),-6,"years"),"%Y and Prior") else datetimeformat([Invoice Date],"%Y") endif

Qiu
21 - Polaris
21 - Polaris

@MOlinski 
Similar with @griffinwelsh flow with a quick sample.

0808-MOlinski.png

Labels