G
Guest
I have a query that calculates averages, etc. for test information. There is
then a field that calculates the average of three fields (OpECT, MidECT, and
DrECT). Here's where I have a problem: When test information is entered,
there may not be a, for example, DrECT for a specific test. So, when the
average is calculated I do NOT want the average of the three fields to be
affected by a 0. Therefore, I was wondering if there is a way to average only
those of the three fields that have a value greater than 0.
For example:
OpECT MidECT DrECT AvgECT
100 95 90 95 ((100+95+90)/3)
55 65 0 60 ((55+65)/2))
(The second one divided by 2 because only 2 of the 3 are greater than 0)
I hope this is not too confusing...I'd appreciate any help! Thanks!
then a field that calculates the average of three fields (OpECT, MidECT, and
DrECT). Here's where I have a problem: When test information is entered,
there may not be a, for example, DrECT for a specific test. So, when the
average is calculated I do NOT want the average of the three fields to be
affected by a 0. Therefore, I was wondering if there is a way to average only
those of the three fields that have a value greater than 0.
For example:
OpECT MidECT DrECT AvgECT
100 95 90 95 ((100+95+90)/3)
55 65 0 60 ((55+65)/2))
(The second one divided by 2 because only 2 of the 3 are greater than 0)
I hope this is not too confusing...I'd appreciate any help! Thanks!