Average Collect Issues
Hello! I'm trying to write a formula that will average the amount of time a type of request takes to complete by month. I'm referencing another sheet in this formula and just can't get it to work. Here's what I have so far:
=AVG(COLLECT{Hours to Complete}, ISNUMBER(@cell), {Request Type}, "Quote Request", {Submitted Date}, YEAR(@cell) = 2023, {Submitted Date}, MONTH(@cell) = 1)
I'm not sure if I need the "IS NUMBER" or not, but I don't want it to count blank cells.
Anyone have ideas? Thanks in advance!
Best Answer
-
The ISNUMBER isn't needed because the AVG function omits blanks.
=IFERROR(AVG(COLLECT([Hours to Complete]:[Hours to Complete], [Request Type]:[Request Type], "Quote Request", [Submitted Date]:[Submitted Date], AND(VALUE(YEAR(@cell)) = 2023, VALUE(MONTH(@cell)) = 3))), "")
=IFERROR(AVG(COLLECT({Hours to Complete}, {Request Type}, "Quote Request", {Submitted Date}, AND(VALUE(YEAR(@cell)) = 2023, VALUE(MONTH(@cell)) = 3))), "")
If you have any missing Submitted Dates there might be an error so make sure they are all filled in.
Answers
-
The ISNUMBER isn't needed because the AVG function omits blanks.
=IFERROR(AVG(COLLECT([Hours to Complete]:[Hours to Complete], [Request Type]:[Request Type], "Quote Request", [Submitted Date]:[Submitted Date], AND(VALUE(YEAR(@cell)) = 2023, VALUE(MONTH(@cell)) = 3))), "")
=IFERROR(AVG(COLLECT({Hours to Complete}, {Request Type}, "Quote Request", {Submitted Date}, AND(VALUE(YEAR(@cell)) = 2023, VALUE(MONTH(@cell)) = 3))), "")
If you have any missing Submitted Dates there might be an error so make sure they are all filled in.
-
This worked! Thank you :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!