Calculating Avg for Date Range

  • Thread starter Thread starter Rebecca Ford
  • Start date Start date
R

Rebecca Ford

I have a created a table. I want to get the "average" for
a certain range of dates that I have data entered for. I
created a query...in the criteria section added my date
parameters. In totals, I selected "avg". The query
returns the avg for each date...not the date range (like
3/1/04 to 3/15/04). How do I get just the average for
those date ranges? Not the exact dates? TIA!!!
Rebecca Ford
(e-mail address removed)
 
I am guessing that you have included the 'date' column in
the select and group by statements. If so, uncheck it and
you should be fine.

Hope This Helps
Gerald Stanley MCSD
 
The SQL statement would look like
SELECT Avg(SomeField) as AverageOfSomeField
FROM SomeTable
WHERE TheDateField Between #3/1/04# and #3/15/04#

In the grid
Field: SomeField
Total: Avg

Field: DateField
Criteria: Between #3/1/04# and #3/15/04#
Show: <Not Checked>
 
thanks all!
-----Original Message-----

The SQL statement would look like
SELECT Avg(SomeField) as AverageOfSomeField
FROM SomeTable
WHERE TheDateField Between #3/1/04# and #3/15/04#

In the grid
Field: SomeField
Total: Avg

Field: DateField
Criteria: Between #3/1/04# and #3/15/04#
Show: <Not Checked>



.
 
Back
Top