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.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 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
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!