hi,
i have following formula build into my Alteryx workflow, that always looks at the data for current month and it would pull back data for previous month is today is 1st of the current month.
if DateTimeDay(DateTimeToday()) = 1
then DateTimeAdd(DateTimeAdd(DateTimeToday(),[Date today]*-1,"days"),-1,"month")
else DateTimeAdd(DateTimeToday(),(DateTimeDay(DateTimeToday())-1)*-1,"days") endif
I am struggling to modify the above formula to account for the fact that when i run report on Sunday (and if said sunday is in the new month) how can i get data for previous month with the cut off day previous friday?
what i am trying to do is to get sales data previous month if sunday is in 2nd November, and look at the current month if sunday is on any other day of the current month
Solved! Go to Solution.
Hi,
Perfect. Thank you. 😊
Hi,
just one more question.
I need to apply same logic to last year as i need to compare month on month.
How would I need to modify the formula, please?
Thank you.
Hi,
It's correct what you have done. The formula below give the same but for last year (year -1)
Regards,
Hi,
I was expecting to see the answer as 2019-10-01 not 2019-11-01
Pluss i need to take in consideration the fact that 1st November last year was on Friday.
Please explain the logic behind this calculation
thank you
Thank you. 👍
So, when i run this on sunday this week i should get answer as 2020-11-01 and 2019-11-01?
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |