COUNTIFS for year within criteria
I am pretty new to using formulas. I'm working on a dashboard for one of my sheets and I want to show how many escalations a plant has had this year alone. Here is what I have so far:
=COUNTIFS(([Plant]:[Plant], "Changzhou"), IFERROR(YEAR(@cell), 0) = 2019)
I've tried many different variations based on my scouring of this community but I keep getting #unparseable error. Can anyone help me get it right? Thanks!
Comments
-
https://help.smartsheet.com/function/countifs
COUNTIFS(range1,criterion1,range2,criterion2
The main thing I notice is that your second part of your countifs statement doesn't have a range. You aren't telling it where to look for the date. Once you have determined what formula you want to use, if you aren't sure how to properly utilize the formula, the official smartsheet documentation is a much faster way to learn how to implement than the community.
=countifs([Plant]:[Plant], "Changzhou",Date:Date,Year(@cell)=2019)
-
I got it! Thanks for your help! My first copy/paste didn't work. I had to make some tweaks. Here is what it was in the end:
=COUNTIFS(Plant:Plant, "Changzhou", [Date of Issue]:[Date of Issue], YEAR(@cell) = 2019)
-
Not a problem. If you want to not have to edit the formula each year by having it update itself every year, you can do something like this
=COUNTIFS(Plant:Plant, "Changzhou", [Date of Issue]:[Date of Issue], YEAR(@cell) = year(today())
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 146 Just for fun
- 63 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!