Joined: 04 Aug 2008
Location: United States
Online Status: Offline
Posts: 1
Topic: Counts and Graphs Posted: 04 Aug 2008 at 9:34am
ok. i am dealing with one table. the user wants a stacked graph of how many new patients came in in an hour and then also the total number of patients in the unit for the hour. I have an arrived time and a departed time.
I can get the count by hour for the arrivals by simply grouping by the arrival hour and doing a count of the patient id's. but how do i get the count of patients in house for the hour stated in a way that i can also graph it. i had started by making 24 fields but then didn't know how to combine that into one field.
for example
for hour 00 there were 3 new patients and 52 total patients for hour 01 there were 2 new patients and 45 total patients and so on.
Joined: 06 Aug 2008
Online Status: Offline
Posts: 3
Posted: 06 Aug 2008 at 7:03am
Hi,
You could try making one field which is a large "if" statement which works out which hour they are in, then return a 1, 2, etc... then use this as the data in a stacked bar. This should then show a portion per hour.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum