Calculating averages

SQUIZZ

New member
Local time
Today, 13:56
Joined
Nov 5, 2006
Messages
2
I have a database containing values in 16 fields. the fields are filled in over a period of three years. I would like to be able to calculate the average of the last four values entered, regardless of when in the cycle the value is required. I have tryed to use quereies but connot find away to assign the four fields to the expression so that it is the last four values and if four don't exist, avearage what values there are.
 
Are you talking about average of 4 last records or fields????
 
Sorry I didn't explain that very well. The values (pupils levels) are entered via a form and are recorded in a main table with field names R1 - R16. Let us say that when the average of these values are required, values have been entered via the form for fields R1 -R9. I want the query to calculate the average for the last four entries i.e. R6 - R9. Also, if the child was away for any of the past four entries, the average should be based on only the fields that contain values (ignoring the empty field). So if a child was away when value R7 was entered, then the average would be taken from R6, R8 and R9 etc.
Again thanks for any help in advance.
 

Users who are viewing this thread

Back
Top Bottom