What expression would I need to put in the criteria of a field in a query to return a 4 wk avg from another field. the Data is entered daily, and I want the average for the last 30 entrys. Not sure how to write it...
1. In a new field use the access DAvg function to self refer to the query based on the last 30 days. So if your query was called qryData based on a table called tblData, the field you were averaging was called fldData, and the date field was called fldDate, the new field would be:
My Avg: DAvg("fldData","tblData","fldDate>=DateAdd('d',-30,Date())"
2. Base a GroupBy query on your original query that uses criteria to look at the last 30 days and averages out the data.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.