A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Averages Calculations



 
 
Thread Tools Display Modes
  #1  
Old September 26th, 2005, 09:51 PM
Robert
external usenet poster
 
Posts: n/a
Default Averages Calculations

I need to create a query that will give me averages on a list of numbers.

How can I calculate the averages, but ignore 0 or null values. Addtionally
if I am ignoreing the 0 value I don't want the record field to factored in
the average count.

e.g.

5
0
2
4

In this senario I would want the averages to be be caluated on the 3 records
with values in excess of 0., 5+2+4=11 11/3 =3.6

If I took the 0 value I would end up with an average of 11/4=2.75 - which is
what I don't want

Any help would be appreciated.
  #2  
Old September 26th, 2005, 10:00 PM
Rick B
external usenet poster
 
Posts: n/a
Default

One post per question, please.

--
Rick B



"Robert" wrote in message
news
I need to create a query that will give me averages on a list of numbers.

How can I calculate the averages, but ignore 0 or null values. Addtionally
if I am ignoreing the 0 value I don't want the record field to factored in
the average count.

e.g.

5
0
2
4

In this senario I would want the averages to be be caluated on the 3

records
with values in excess of 0., 5+2+4=11 11/3 =3.6

If I took the 0 value I would end up with an average of 11/4=2.75 - which

is
what I don't want

Any help would be appreciated.



  #3  
Old September 27th, 2005, 01:32 AM
John Spencer (MVP)
external usenet poster
 
Posts: n/a
Default

Answered elsewhere.

MyAverage: Avg(IIF YourField = 0, Null, YourField)

Robert wrote:

I need to create a query that will give me averages on a list of numbers.

How can I calculate the averages, but ignore 0 or null values. Addtionally
if I am ignoreing the 0 value I don't want the record field to factored in
the average count.

e.g.

5
0
2
4

In this senario I would want the averages to be be caluated on the 3 records
with values in excess of 0., 5+2+4=11 11/3 =3.6

If I took the 0 value I would end up with an average of 11/4=2.75 - which is
what I don't want

Any help would be appreciated.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Calculations Craig Running & Setting Up Queries 1 July 6th, 2005 12:57 AM
Calculations crossing multiple sheets Stephen McArthu General Discussion 4 June 6th, 2005 04:35 PM
time interval calculations in excel Krishna General Discussion 6 April 8th, 2005 02:57 PM
Calculations in a query...Is there a max count? HD87glide Running & Setting Up Queries 3 February 15th, 2005 06:29 AM
Date Calculations for Staff [email protected] General Discussion 1 December 10th, 2004 10:11 PM


All times are GMT +1. The time now is 04:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.