gRegulator
Technical User
Hi,
I am trying to figure out how to calculate an average daily count of clients that we supervise. I have all my data stored in a Master table called tbl_offenders.
From the tbl_offenders I would like the following fields:
Male, Female, Probation Start, Probation Expiry. Where Male and Female are yes/no fields and Probation Start and Expiry are Date Fields.
So: I would like the query to be able to basically populate the following table:
Male Female Total
April | | |
May | | |
June | | |
etc....
So, a client would only be counted if his/her probation started sometime in the month and expired sometime in a given month. I.e. If Client #123 started probation on the 26th of May, then he would be counted for may. However, i would like it to be a daily count, so i was thinking that maybe there is a way to give them a count for each day they are on probation. i.e. Client #123 would receive 6 'points' because for May he is under our supervision for 6 days. I would like the 'points' to be tallied and divided by the number of days in each month, to get an average DAILY count of the number of clients we supervise for that month.
Is this possible? I may be going about this the total wrong way, but hopefully it is clear what I am trying to accomplish.
Thanks in advance and I truly appreciate any help I can get!
I am trying to figure out how to calculate an average daily count of clients that we supervise. I have all my data stored in a Master table called tbl_offenders.
From the tbl_offenders I would like the following fields:
Male, Female, Probation Start, Probation Expiry. Where Male and Female are yes/no fields and Probation Start and Expiry are Date Fields.
So: I would like the query to be able to basically populate the following table:
Male Female Total
April | | |
May | | |
June | | |
etc....
So, a client would only be counted if his/her probation started sometime in the month and expired sometime in a given month. I.e. If Client #123 started probation on the 26th of May, then he would be counted for may. However, i would like it to be a daily count, so i was thinking that maybe there is a way to give them a count for each day they are on probation. i.e. Client #123 would receive 6 'points' because for May he is under our supervision for 6 days. I would like the 'points' to be tallied and divided by the number of days in each month, to get an average DAILY count of the number of clients we supervise for that month.
Is this possible? I may be going about this the total wrong way, but hopefully it is clear what I am trying to accomplish.
Thanks in advance and I truly appreciate any help I can get!