calculating average

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column of numbers that I want to average, but I don't want to
include the records with $0.00 value in it. I currently am using:

Avg([PricePerMW])

in the group footer, which works fine, but its counting the records with
$0.00 in it.
TIA!
 
Try and expression in a footer like:
=Sum([PricePerMW])/Sum(Abs([PricePerMW]<>0))
You may need to trap for divide by zero errors.
 
Thanks, that seemed to work!

--
Patti


Duane Hookom said:
Try and expression in a footer like:
=Sum([PricePerMW])/Sum(Abs([PricePerMW]<>0))
You may need to trap for divide by zero errors.
--
Duane Hookom
MS Access MVP
--

PattiP said:
I have a column of numbers that I want to average, but I don't want to
include the records with $0.00 value in it. I currently am using:

Avg([PricePerMW])

in the group footer, which works fine, but its counting the records with
$0.00 in it.
TIA!
 
Back
Top