Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Report with averages

Status
Not open for further replies.

ZeoGel

Technical User
May 13, 2003
28
US
I have a query i am using to generate a report but my averages are getting diluted because some of the feilds have 0 which shows no data in them but it is being counted when doing the averages how can i fix the averages to skip all feilds that have 0 in them?
 
Try:
=Sum([FieldA])/Abs(Sum([FieldA]<>0))
If they might all be 0 then
=IIF(Abs(Sum([FieldA]<>0)) = 0, 0, Sum([FieldA])/Abs(Sum([FieldA]<>0))


Duane
MS Access MVP
 
Man this is on the money thank you kind sir for you knowledge


Very Greatful
Zeogel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top