I am trying to get the average of a month with multiple criterias and I cannot get it come back with the right answer. I do not want to use a pivot table where i have been cutting a pasting the value. But i cannot come up with the correct formula any/all help with this is greatly appreciated. Please see below please let me know where I am going wrong. I need to come back with an average for each month but the number is not matching what I have in my Pivot table or when I filter on just the month and Year.
=averageifs('Pt Data'!$AD2:$AD32241,'Pt Data'!$C2:$C32241,$AH$4,'Pt Data'!$E2:$E32241,AB$7)/averageifs('Pt Data'!AD2:AD32241)/('Pt Data'!$AD2:$AD32241,'Pt Data'!$C2:$C32241,$AH$4,'Pt Data'!$E2:$E32241,AB$7))
=averageifs('Pt Data'!$AD2:$AD32241,'Pt Data'!$C2:$C32241,$AH$4,'Pt Data'!$E2:$E32241,AB$7)/averageifs('Pt Data'!AD2:AD32241)/('Pt Data'!$AD2:$AD32241,'Pt Data'!$C2:$C32241,$AH$4,'Pt Data'!$E2:$E32241,AB$7))
Enc - Discharge Year | Enc - Discharge Month Desc | Enc - Patient Type Desc | Enc - MS DRG CMS Geometric Mean LOS |
2021 | January | Inpatient | 3.3 |
2021 | January | Inpatient | 5.2 |
2021 | January | Inpatient | 3.3 |
2021 | January | Inpatient | 3.9 |
2021 | January | Inpatient | 2.5 |
2021 | January | Inpatient | 2 |
2021 | January | Inpatient | 2.6 |
2021 | January | Outpatient | 0 |
2021 | January | Outpatient | 0 |
2021 | January | Inpatient | 2.7 |
2021 | January | Inpatient | 4.3 |
2021 | January | Inpatient | 4.3 |
2021 | January | Inpatient | 4 |
2021 | January | Inpatient | 3.3 |
2021 | January | Inpatient | 7.4 |
2021 | January | Inpatient | 3.3 |
2021 | January | Inpatient | 1.7 |
2021 | January | Inpatient | 4.3 |
2021 | January | Inpatient | 3.1 |
2021 | January | Inpatient | 6 |
2021 | January | Inpatient | 3.3 |
2021 | January | Inpatient | 4.1 |
2021 | January | Inpatient | 3.1 |
2021 | January | Inpatient | 6 |