Hi all,
I'm stuck trying to work out the average number of patients we get per day (each month) from a list of appointments like below.
I started by doing a pivot table with dates as rows grouped by month, but 'Count of Patients' seemed to actually produce a count of rows, not specific / unique patients.
So I resorted to creating a list of unique dates, then counting a filtered list of unique patients against each date, then creating a pivot table of that produced what I think are the right answers that I'm looking for
But how can I do it with a formula for a given month, instead of extra lists and pivot tables?
I'm stuck trying to work out the average number of patients we get per day (each month) from a list of appointments like below.
I started by doing a pivot table with dates as rows grouped by month, but 'Count of Patients' seemed to actually produce a count of rows, not specific / unique patients.
So I resorted to creating a list of unique dates, then counting a filtered list of unique patients against each date, then creating a pivot table of that produced what I think are the right answers that I'm looking for
But how can I do it with a formula for a given month, instead of extra lists and pivot tables?
Book1 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | J | |||
5 | Date | Day | Patient | Unique dates | Unique Patients Per day | ||||||
6 | 03 Aug 21 | Tue | 00008 | 03 Aug 21 | 1 | Pivot table source is Cols F & G | |||||
7 | 04 Aug 21 | Wed | 00060 | 04 Aug 21 | 1 | ||||||
8 | 05 Aug 21 | Thu | 00024 | 05 Aug 21 | 1 | Row Labels | Average Patients per day | ||||
9 | 07 Aug 21 | Sat | 00061 | 07 Aug 21 | 1 | 2021 | 4.0 | ||||
10 | 10 Aug 21 | Tue | 00008 | 10 Aug 21 | 1 | Aug | 1.0 | ||||
11 | 11 Aug 21 | Wed | 00058 | 11 Aug 21 | 1 | Sep | 3.8 | ||||
12 | 12 Aug 21 | Thu | 00062 | 12 Aug 21 | 1 | Oct | 5.6 | ||||
13 | 14 Aug 21 | Sat | 00057 | 14 Aug 21 | 1 | Nov | 5.0 | ||||
14 | 17 Aug 21 | Tue | 00008 | 17 Aug 21 | 1 | Dec | 4.5 | ||||
15 | 18 Aug 21 | Wed | 00008 | 18 Aug 21 | 1 | 2022 | 3.9 | ||||
16 | 19 Aug 21 | Thu | 00063 | 19 Aug 21 | 1 | Jan | 4.9 | ||||
17 | 21 Aug 21 | Sat | 00033 | 21 Aug 21 | 1 | Feb | 3.7 | ||||
18 | 24 Aug 21 | Tue | 00015 | 24 Aug 21 | 1 | Mar | 3.9 | ||||
19 | 25 Aug 21 | Wed | 00014 | 25 Aug 21 | 1 | Apr | 3.3 | ||||
20 | 26 Aug 21 | Thu | 00057 | 26 Aug 21 | 1 | May | 3.6 | ||||
21 | 28 Aug 21 | Sat | 00002 | 28 Aug 21 | 1 | Grand Total | 3.9 | ||||
22 | 01 Sep 21 | Wed | 00001 | 01 Sep 21 | 5 | ||||||
23 | 01 Sep 21 | Wed | 00002 | 02 Sep 21 | 2 | ||||||
24 | 01 Sep 21 | Wed | 00003 | 04 Sep 21 | 1 | ||||||
25 | 01 Sep 21 | Wed | 00004 | 07 Sep 21 | 2 | ||||||
26 | 01 Sep 21 | Wed | 00005 | 08 Sep 21 | 3 | ||||||
27 | 01 Sep 21 | Wed | 00005 | 09 Sep 21 | 2 | ||||||
28 | 01 Sep 21 | Wed | 00001 | 11 Sep 21 | 8 | ||||||
29 | 01 Sep 21 | Wed | 00002 | 14 Sep 21 | 3 | ||||||
30 | 01 Sep 21 | Wed | 00003 | 15 Sep 21 | 4 | ||||||
31 | 01 Sep 21 | Wed | 00004 | 16 Sep 21 | 4 | ||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F6:F162 | F6 | =SORT(UNIQUE(Table1[Date])) |
C6:C31 | C6 | =TEXT([@Date],"ddd") |
G6:G31 | G6 | =COUNTA(UNIQUE(FILTER(Table1[Patient],Table1[Date]=F6))) |
Dynamic array formulas. |