Davg function

  • Thread starter Thread starter Jim Lonergan
  • Start date Start date
J

Jim Lonergan

Hi Folks,

I have analyzing some data in a electric utility database
I have created. Each record in the database represents a
resident's utulity bill in both tkw(total kilowats) and
cost.

I have been able to sum and average tke and costs using a
summary footer grouped on the residents apartment number.
For each apartment I have about 12 months worth of data or
12 utility bills or 12 records. Each record is dated
meaning one record would be 1/1/04 then next would be
2/1/04, etc.

I am trying to get the average kilowats in the summer
months or 6/1/04 to 8/1/04. Here is what is in the
control field:

=DAvg([Total kWh],"[Utlitily Analysis 2005 Los Tainos Edit
1]",[Read Date]>'6/1/2004')

I have gotten this field to stop showing #error when I
preview it but the field is blank. This field is located
in the summary footer grouped on Apartment number.

Can anyone offer assistance on this?

Jim
 
Try this:

=DAvg("[Total kWh]","[Utlitily Analysis 2005 Los Tainos Edit 1]","[Read
Date]>#6/1/2004#")
 
Trash DAvg() and try:
=Sum(Abs([Read Date]>=#6/1/2004# AND [Read Date]<#8/1/2004#) * [Total kWh])
/
Sum(Abs([Read Date]>=#6/1/2004# AND [Read Date]<#8/1/2004#))
 
Thanks so much, ... you folks are terrific.

Jim
-----Original Message-----
Try this:

=DAvg("[Total kWh]","[Utlitily Analysis 2005 Los Tainos Edit 1]","[Read
Date]>#6/1/2004#")

--

Ken Snell
<MS ACCESS MVP>


Jim Lonergan said:
Hi Folks,

I have analyzing some data in a electric utility database
I have created. Each record in the database represents a
resident's utulity bill in both tkw(total kilowats) and
cost.

I have been able to sum and average tke and costs using a
summary footer grouped on the residents apartment number.
For each apartment I have about 12 months worth of data or
12 utility bills or 12 records. Each record is dated
meaning one record would be 1/1/04 then next would be
2/1/04, etc.

I am trying to get the average kilowats in the summer
months or 6/1/04 to 8/1/04. Here is what is in the
control field:

=DAvg([Total kWh],"[Utlitily Analysis 2005 Los Tainos Edit
1]",[Read Date]>'6/1/2004')

I have gotten this field to stop showing #error when I
preview it but the field is blank. This field is located
in the summary footer grouped on Apartment number.

Can anyone offer assistance on this?

Jim


.
 
Back
Top