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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |