How to average the duration between dates if conditions are met
I'm building a spreadsheet with monthly metrics and having issues creating a formula.
There will be a separate smartsheet with individual events (1 row per event). The formula I'm trying to build: For all events with a date of notification within X month & year, average duration between 2 dates (start & end date for each event).
I need the formula to go through all rows to find any rows with a date of notification within that month and if it meets that criteria, to average the duration of that event with any other events that also occurred within that month.
The equation I've tried to use so far is:
=AVERAGEIF({Date of Notification}, AND(IFERROR(MONTH(@cell), 0) = MONTH([Start Date]@row), IFERROR(YEAR(@cell), 0) = YEAR([Start Date]@row)), NETDAYS({Date of Notification}, {Closure Date}))
The {Date of Notification} and {Closure Date} both reference whole columns. Is there a way to do this or do I need to create a helper "Netdays" column within the individual event smartsheet and then use that as my range for AverageIf?
Best Answer
-
You have to have the duration on each row of the source sheet. Then you can average the duration column in your formula.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
You have to have the duration on each row of the source sheet. Then you can average the duration column in your formula.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 378 Global Discussions
- 208 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
- 289 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!