Hi there,
I'm fairly new to Alteryx and I'm struggling to come up with the right formula.
What I need is if a date is less than the first of the previous month then return the first of the previous month. Also if a date is greater than last day of the previous month return the last of the month previous month.
This is what I have but it's not going to work for months that don't have 31 days.
datetimeadd(datetimefirstofmonth(),-1,'days')
datetimeadd(datetimefirstofmonth(),-31,'days')
if [Date]>[Find last day of the month]then[Find last day of the month]
else (if [DATE]<[Find first day of the month]then[Find first day of the month]
else [DATE] endif) endif
Any help is appreciated!
Thanks,
Jenn
Try this:
Yes! This works perfectly
Thanks so much
-Jenn