calculating average

P

PattiP

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!
 
D

Duane Hookom

Try and expression in a footer like:
=Sum([PricePerMW])/Sum(Abs([PricePerMW]<>0))
You may need to trap for divide by zero errors.
 
P

PattiP

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!
 
Top