View Single Post
  #3  
Old July 31st, 2007, 01:13 AM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 2,364
Default In Access what expression do I use to average a field ignoring0?

If you want zero excluded from the calculation, then use a formula like

Avg(IIF(SomeField=0,Null,SomeField))




'================================================= ===
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'================================================= ===


Dan Test wrote:
I have a report that calculates the average of a requested field. The average
is not correct due to "0" values in some of the records. What expression do I
use in the Control Source to ignore the 0 entries? I tried to adapt the one I
use in Excel but did not get the results I was looking for.
Thanks for the help.