Previous Month formula
Hi
I'm in the process of creating MTD and Previous MTD helper columns. If the Create Date is current month, I want to check a box. I have this formula working perfectly. What I'm struggling with is previous MTD. If the Create Date is the previous month, then check a box. If the Create Date is older than previous month, don't check the box or uncheck the box if it was already check. Below is my formula for the MTD
=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = MONTH(TODAY())), 1)
I'm sure it is an easy formula but I can't figure it out.
Best Answer
-
If you're just wanting the month to compare to last (e.g. July today vs. June last), then this will do what you're after:
=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = (MONTH(TODAY())) - 1), 1)
Hope this helps! 😊
Answers
-
If you're just wanting the month to compare to last (e.g. July today vs. June last), then this will do what you're after:
=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = (MONTH(TODAY())) - 1), 1)
Hope this helps! 😊
-
@Nick Korna - that did it. I have the 1 in the wrong place. I had it in the TODAY(-1). Thank you for your help and I hope you have a great day!
-
You're more than welcome; happy to have helped!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!