Hello,
I would like some help. I have tried this formula in many different ways. I have a master sheet that contains entries as a date, added a column to extract the year. Each entry could be located in two locations. I also have the length of stay of each base on the dates (entry date and exit date as well as a running one). I am trying to add and average the length of stay in a certain year in a certain location.
So far I have tried
1-
=IFERROR(AVG(COLLECT({Running Days in WSP}, {Year Admit in WSP Helper}, "2025")) + AVG(COLLECT({1st Rnd Days in WSP}, {1st Rnd Year Admit Helper}, "2025")), 0)
2-
=AVG(COLLECT([Running Days In WSP]:[Running Days In WSP], [In SUD Wellness Program]:[In SUD Wellness Program], true, [Previously in WSP 1st Rnd]:[Previously in WSP 1st Rnd], true, [Previously in WSP]:[Previously in WSP], true, [Location (Bldg No.)]:[Location (Bldg No.)], 1205, [1st Rnd Location (Bldg No.)]:[1st Rnd Location (Bldg No.)], 1205) + COLLECT([1st Rnd Days in WSP]:[1st Rnd Days in WSP], [In SUD Wellness Program]:[In SUD Wellness Program], true, [Previously in WSP 1st Rnd]:[Previously in WSP 1st Rnd], true, [Previously in WSP]:[Previously in WSP], true, [Location (Bldg No.)]:[Location (Bldg No.)], 1205, [1st Rnd Location (Bldg No.)]:[1st Rnd Location (Bldg No.)], 1205))
3-
=AVERAGEIF([Running Days In WSP]:[Running Days In WSP], AND([Location (Bldg No.)]@row = "1205", [Year Admit into WSP Helper]@row = "2025")) + AVERAGEIF([1st Rnd Days in WSP]:[1st Rnd Days in WSP], AND([1st Rnd Location (Bldg No.)]@row = "1205", [1st Rnd Year Admitted Helper]@row = "2025"))
and
4-
=AVG(COLLECT([Running Days In WSP]:[Running Days In WSP], [Year Admit into WSP Helper]:[Year Admit into WSP Helper], "2025")) + AVG(COLLECT([1st Rnd Days in WSP]:[1st Rnd Days in WSP], [1st Rnd Year Admitted Helper]:[1st Rnd Year Admitted Helper], "2025"))
Non of these seem to work. Also the formula is going into a separate sheet.
Thank You in advance for y'alls help.