Need to average a range within a certain month
I am trying to average a column that has its own set criteria and calculating it with in a month. I am separately doing these two formulas but now want to combine it. My first formula:.
=IFERROR(AVG(COLLECT({time in days}, {hospital specialty}, "Acute Care", {job type}, <>"PCT")), "")
This gives me an average time to nursing practice for my entire data set. I want to be able to average it by month that the data was entered.
I was already counting the entries by month with this formula:
=COUNTIFS({date}, AND(IFERROR(MONTH(@cell), 0) = 3, IFERROR(YEAR(@cell), 0) = 2020))
I tried to combine the two and can't get it right. Please help!
Best Answer
-
Try this:
=IFERROR(AVG(COLLECT({time in days}, {hospital specialty}, "Acute Care", {job type}, <>"PCT", {date}, AND(IFERROR(MONTH(@cell), 0) = 3, IFERROR(YEAR(@cell), 0) = 2020))), "")
Answers
-
Try this:
=IFERROR(AVG(COLLECT({time in days}, {hospital specialty}, "Acute Care", {job type}, <>"PCT", {date}, AND(IFERROR(MONTH(@cell), 0) = 3, IFERROR(YEAR(@cell), 0) = 2020))), "")
-
Thanks Paul! That worked perfect. You are awesome.
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!