I have a problem in a query where I have Nurse names, Patient Names, # of visits, Year and Month. I am not getting the right totals for each month, I am getting the overall total for all months. Example below
What I get
Nurse Patient Visit Year Month
Jane Doe John Doe 12 2003 5
Jane Doe John Doe 12 2003 7
Jane Doe John Doe 12 2003 8
What I want
Nurse Patient Visit Year Month
Jane Doe John Doe 4 2003 5
Jane Doe John Doe 5 2003 7
Jane Doe John Doe 3 2003 8
Can anyone tell me why this happens and how I might be able to fix it? I'm pretty stuck.
Thanks
What I get
Nurse Patient Visit Year Month
Jane Doe John Doe 12 2003 5
Jane Doe John Doe 12 2003 7
Jane Doe John Doe 12 2003 8
What I want
Nurse Patient Visit Year Month
Jane Doe John Doe 4 2003 5
Jane Doe John Doe 5 2003 7
Jane Doe John Doe 3 2003 8
Can anyone tell me why this happens and how I might be able to fix it? I'm pretty stuck.
Thanks