We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Last Day of Month Generator

MOlinski
7 - Meteor

Hello,

 

We are trying to create a workflow for aging invoices and are a little stuck. So we are running this report in August, but would like a column that produces the last day of the month for the prior month, so in this case, we would like 2024-07-31 to repeat down the column.

 

Example:

Invoice Dates

2024-05-27
2023-04-15
2024-06-05
2024-07-29

 

Expectation:

 

Invoice DatesDate
2024-05-272024-07-31
2023-04-152024-07-31
2024-06-052024-07-31
2024-07-292024-07-31
3 REPLIES 3
binuacs
21 - Polaris

@MOlinski use the DateTime functions

 

toDate(DateTimeAdd(DateTimeFirstOfMonth(),-1,'day'))

image.png

MOlinski
7 - Meteor

Thank you @binuacs , also, 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
binuacs
21 - Polaris
Labels
Top Solution Authors