Average with multiple criteria
Faheem
✭✭
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
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 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!