averages containging null values

G

greg

I have a grouped field in a report that returns some percentage values
ie
90%
90%
0%
50%
null
i want to calculate the average percentage of this field excluding 0 and
null and put it in the group footer
ie
230/3 = 76.66%
 
J

John Spencer

How about using the following expression

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

Avg ignore nulls so any field the is null won't be used to calculate the
average. And you are forcing zeroes to Null, so they won't be used in the
calculation either.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top