COUNTIFS Resolved (or not) within 2 days over the last 7 days
I have the following columns:
Date (I refer to this as 'Date Opened' below)
Resolved (checkbox)
Resolved Date
Formulas in the 'Sheet Summary' section
I am trying to create these formulas to reflect on the last 7 days, will be used to make a dashboard chart widget:
- Resolved on time (2 Days) over the last 7 days
- Count the number of times the Resolved checkbox is checked and has a Resolved Date within 2 Days of the 'Date Opened' field. Count all occurrences over the last 7 days.
- This is my attempt at the formula, but it just returns to 0 when it should meet criteria.
- =COUNTIFS(Resolved:Resolved, 1, [Resolved Date]:[Resolved Date], @cell <= TODAY(), [Resolved Date]:[Resolved Date], @cell >= TODAY(-2), Date:Date, @cell <= TODAY(), Date:Date, @cell >= TODAY(-7))
- In Progress
- Count the number of times the Resolved checkbox is unchecked and Today's date is within 2 Days of the 'Date Opened' field.
- Not Resolved on time (2 Days) over the last 7 days
- Count the number of times the Resolved checkbox is checked or not checked and has a Resolved Date past 2 Days of the 'Date Opened' field. Count all occurrences over the last 7 days.
How would this be achieved if I am only interested in workdays (M-F)?
For these formulas, I will be able to see if the service level agreement has been met for the year:
- Resolved on time (2 Days) over the last 7 days, Running Total.
- Count the number of times the Resolved checkbox is checked and has a Resolved Date within 2 Days of the 'Date Opened' field. Count all occurrences.
- Not Resolved on time (2 Days) over the last 7 days, Running Total.
- Count the number of times the Resolved checkbox is checked or not checked and has a Resolved Date past 2 Days of the 'Date Opened' field. Count all occurrences.
Answers
-
Hi John,
The best way to achieve this may be to add another column. I called that column Duration. Here's the formula I entered in that column:
=IF(Resolved@row = 1, NETWORKDAYS(Date@row, [Resolved Date]@row), NETWORKDAYS(Date@row, TODAY()))
This translates to:
If Resolved is checked, count the number of work days between the start date and the resolved date. Otherwise, count the number of work days from the start date to today.
On my sheet summary, I was able to use these formulas:
Resolved on time (2 days) past 7 days:
=COUNTIFS(Resolved:Resolved, 1, Duration:Duration, <3, Date:Date, >=TODAY(-7))
In Progress: **Note: this only counts items that are NOT overdue.
=COUNTIFS(Resolved:Resolved, 0, Date:Date, <=TODAY(-2))
Not resolved on time (2 days) past 7 days:
=COUNTIFS(Duration:Duration, >2, Date:Date, >=TODAY(-7))
Resolved on time (running total):
=COUNTIFS(Resolved:Resolved, 1, Duration:Duration, <3)
Not resolved on time (running total):
=COUNTIF(Duration:Duration, >2)
Hope this helps!
Best,
Heather
-
Hi Heather,
Thanks to your formula, I was able to utilize my existing "Days to Resolution Column".
Here are the results of the formulas in the sheet summary:
- Resolved on time (2 days) past 7 days: #INVALID DATA TYPE
- In Progress: This seems to be only counting the instances that the resolved Checkbox and not accounting for the 2 day period. I changed less than symbol to a greater than symbol, resulting the the formula: =COUNTIFS(Resolved:Resolved, 0, Date:Date, and this appears to be working.
- Not resolved on time (2 days) past 7 days: #INVALID DATA TYPE
- Resolved on time (running total): #INVALID DATA TYPE
- Not resolved on time (running total): #INVALID DATA TYPE
-
Reviewing the formula:
=IF(Resolved@row = 1, NETWORKDAYS(Date@row, [Resolved Date]@row), NETWORKDAYS(Date@row, TODAY()))
If the Resolved Date is the same day as the Date Opened, the result will be 1. Instead, I would like this to be 0, since a whole day has not occurred. How would I make this change? Thank you
-
I figured out why I was receiving the #INVALID DATE TYPE error. It was because I have blank Resolved Date fields. I got it working now that I entered this data.
I just need to know how to change the following formula to meet the desired outcome below:
=IF(Resolved@row = 1, NETWORKDAYS(Date@row, [Resolved Date]@row), NETWORKDAYS(Date@row, TODAY()))
If the Resolved Date is the same day as the Date Opened, the result will be 1. Instead, I would like this to be 0, since a whole day has not occurred. How would I make this change?
Thank you
-
You have subtract a day. The following example is similar. Also, for the invalids you may be able to use the ISDate function so it ignores non dates. Hope this helps
=IF(ISDATE([Baseline Completion Rollup]@row), IF([Baseline Completion]@row < [End Date]@row, -1 * NETWORKDAY([Baseline Completion Rollup]@row, [End Date]@row, {Holidays}) + 1, IF([Baseline Completion]@row = [End Date]@row, 0, NETWORKDAY([End Date]@row, [Baseline Completion Rollup]@row, {Holidays}) - 1)))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.8K Get Help
- 406 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!