Average with multiple criteria
I am trying to get the average of a column named "Average working Days" while the "STATUS" = "On Hold", "In Progress" and "Not Started" and when I tried it, it gives me #Divide by zero.
=AVG(COLLECT({Request Tracker with Form Range - Average}, {Request Tracker Range 3}, Category@row, {Request Tracker Range 2 - Status}, "Not Started", {Request Tracker Range 2 - Status}, "In Progress", , {Request Tracker Range 2 - Status}, "On Hold"))
Tags:
Answers
-
Hi
There are a couple of problems with the formula.
- There is an extra comma after “In Progress”.
- With a COLLECT function, all criteria must be met to be collected. So this will only return rows where {Request Tracker Range 2 - Status} is equal to “Not started” and also equal to “In progress”, and also…. Which is not possible. A row will have just one of those things in. You can use an OR function within the COLLECT.
Try
=AVG(COLLECT({Request Tracker with Form Range - Average}, {Request Tracker Range 3}, Category@row, {Request Tracker Range 2 - Status}, OR(@cell = "In Progress", @cell = "On Hold", @cell = "Not Started")))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!