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
Check out the Formula Handbook template!