Count previous month items
Hi i am creating a metrics for a Dashboard and i just need a count of new items that were created in the previous month. I am using as base the "created date" column. For your reference i already have one that is counting the items created during the current month and it is working. What i don't know if where to include an argument to change to previous month.
This is the formula that i have now for current month count
=COUNTIFS({What is it?}, "Issue", {Created date}, AND(IFERROR(MONTH(@cell), 0) = MONTH(TODAY()), IFERROR(YEAR(@cell), 0) = YEAR(TODAY())))
Best Answer
-
Try this...
=COUNTIFS({What is it?}, "Issue", {Created date}, AND(IFERROR(MONTH(@cell), 0) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = YEAR(TODAY()) - IF(MONTH(TODAY()) = 12, 1)))
Answers
-
Try this...
=COUNTIFS({What is it?}, "Issue", {Created date}, AND(IFERROR(MONTH(@cell), 0) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = YEAR(TODAY()) - IF(MONTH(TODAY()) = 12, 1)))
-
Thanks Paul you are da man!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!