This one is way above me. I have a table housing absence data for 98 employees.
I need to build a query that sums attendance "occurrences", counting back 31 calendar days from today, but need to skip the dates of any Excused absence if they appear in the table for each individual. Please see the first example. Today is 4/22/15. I need to count back the 31 days, but skip 4/21, 4/20, 4/17, 4/15, 3/23, 3/17, as they are excused.
I have a query that pulls the absence data based on the criteria of the absence type and assigns an occurrence value to each un-excused absence. it is called QRY_OCCURRENCE. It pulls all the data from the table, and assigns it a value of 1 for more than 4hrs absent and .5 for less than 4 hrs absent.
The second example of the query design is where I am stuck. I can sum the occurrences for the past 31 calendar days, with what I have, but need help getting the date skipping function in place. (the remove from count field is based on a check box for when someone receives an attendance write up.)
the third example is when I run the query. It shows Cynthia with a total of 1.5 occurrences, but she should total 2.5, as 6 of the dates in the table are excused absences.
Please, Any help to get me closer to the answer is greatly appreciated!