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.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.9K Get Help
- 441 Global Discussions
- 153 Industry Talk
- 501 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 79 Community Job Board
- 511 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!