Perform Count on "Year-Mon" extracted from Created Date
I have a working sheet that utilises the Created Date functionality by Smartsheet (DD-MM-YY HH:MM).
I am looking to count the number of rows for every Month in a separate sheet to see new rows added over time.
to extract the year-month i have created 3 additional columns:
- Year (=YEAR(Created@row)
- Month (=MONTH(Created@row)
- YEAR-MON (=JOIN(year@row:Month@row, "-")). Set as named range {Completed Year-Mon}
Small subset of rows shown below
In the metrics sheet i have added rows with the different Year/Months i am looking for wit the following formula, however the look up always returns just 1.
=COUNT(COLLECT({Completed Deal Name}, {Completed Year-Mon}, Label@row))
Both the YEAR-MON and the Metrics sheet are in Text/Number format.
Can someone help with this query?
Answers
-
please ignore this question, after refreshing the page the formula worked
-
Hi @fornor1 ,
Your COLLECT function is looking at the range "Completed Deal Name", with a criterion of the Completed Year & Month. Is that what you're intending to count, or are you looking only for a count of each year & month combo?
If you're looking only to count the year & month combos, you could use a COUNTIF - e.g., =COUNTIF({Completed Year-Mon}, Label@row)
Please let us know if that helps, or provide a bit more detail about your "Completed Deal Name" range.
Good luck!
-
i am looking to count the Year and Month combo. i.e. how many rows were created in ech month of 2024
Example:
Jan 2024 (2024-1)
Feb 2024 (2024-2)
etc
The Deal Name is simply a non-blank column with free text to identify the name of the project/client.
i seem to have been using count (collect and countif as the same thing, if different could you explain/send me links to explain the delta? or include examples to ensure I understand
thanks
-
Hello again!
You could write your formula using either "COUNT(COLLECT" or "COUNTIF" - but since your aim is to count the number of cells that meet a specified criteria, the COUNTIF function may be more straightforward.
The COUNTIF function allows you to count the number of cells in a range that meet one specified criterion. (If you have more than one criteria, you could use a COUNTIFS.) The syntax is COUNTIF(Range-You're-Counting, Criterion)
It sounds like you've since got your formula working, though, so that's great! :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!