Calculating Average Work Days with Stipulations
Hello,
I'm trying to calculate average work days that each command takes to return a request. However, it has to meet several other stipulations.
-"Type of Request" has to include "FOIA" (drop-down column multi-select)
-"Date Forwarded to Command #1" (in the formula it's "Date Fwd to C#1") is a date-only select, that sometimes isn't populated (average work days start here)
-"Date Request is Returned from Command #1" (in the formula is "Date Rtnd from C#1") is also a date-only select, that sometimes isn't populated (average work days end here)
-In this specific instance, the command would be "PERSONNEL" in Command #1. (all caps, locked to single drop-down select)
What I have is returning an "#INCORRECT ARGUMENT," and I've played with it for an hour.
=AVERAGEIF((NETWORKDAYS({Date Fwd to C#1}, AND(IFERROR(ISDATE(@cell), 0), {Date Rtnd from C#1}, AND(IFERROR(ISDATE(@cell), 0), AND(IF({Type of Request}, CONTAINS("FOIA", @cell), IF({Command #1}, HAS("PERSONNEL", @cell)))))))))
Answers
-
Try
=AVG(COLLECT({Range to Average}, {1st Criteria Range}, 1st criteria, {2nd Criteria Range}, 2nd criteria, ..............................)
-
Okay, so I tried a mixture of things playing with this for a while. I used this:
=AVG(COLLECT({Date Fwd to C#1}, {Date Rtnd from C#1}, AND(NETWORKDAYS({Date Fwd to C#1}, {Date Rtnd from C#1}), AND(IF({Type of Request}, CONTAINS("FOIA", @cell), IF({Command #1}, HAS("PERSONNEL", @cell)))))))
and got "INVALID DATA TYPE" which probably means that I used wrong syntax somewhere.
I then tried this:
=AVG(COLLECT({Date Fwd to C#1}:{Date Rtnd from C#1}, AND(NETWORKDAYS({Date Fwd to C#1}:{Date Rtnd from C#1}), AND(IF({Type of Request}, CONTAINS("FOIA", @cell), IF({Command #1}, HAS("PERSONNEL", @cell)))))))
and got "UNPARSEABLE." I tried to show the ranges with colons, like I saw in some examples. No luck.
-
What exactly are you trying to average?
-
I'm trying to find an average of workdays that it takes certain places to return requests. So, say Personnel has been sent 15 requests. Based on the dates in the "Sent..." and "Received..." columns, I'm trying to find the average response time in work days it took them to fulfill those 15 requests that were sent to them.
-
You would need to produce those numbers by row on the source sheet in another column. Then we can average that new column on the other sheet.
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!