Re: Calculate Average in a Query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: SteveL (anonymous_at_discussions.microsoft.com)
Date: 06/16/04


Date: Wed, 16 Jun 2004 10:11:13 -0700

Peter,

Thanks, and yes, please provide the link.

--Steve

>-----Original Message-----
>You can do the average with a horrendous mess of nested
IFs to get rid
>of the zero values (is it really zeros you want to
ignore - not
>Nulls?). You will have to do the Median with VBA, so
you might as
>well do both that way. I do question, however, the
statistical value
>of a median of just five (or less) values. Having said
that, I have
>previously posted a general purpose Access Class to do
medians,
>quartiles, deciles, percentiles, etc., and can give you
a link to
>download it, if you wish. You could then call the code
in it it from a
>short VBA stub.
>
>
>On Wed, 16 Jun 2004 06:00:31 -0700, "SteveL"
><anonymous@discussions.microsoft.com> wrote:
>
>>I have a query which returns 5 values in 5 separate
>>fields. (V1, V2, V3, V4, and V5). In the next field I
>>want to average these 5 values. How do I write the
>>formula to do this?
>>
>>Then to make it even more complicated, if the value in
>>any of the fields is "0", I don't want it ncluded in
the
>>calculation.
>>
>>Finally, what I really want is the MEDIAN calculated.
>>
>>Can anyone help?
>>
>>--Steve
>
>
>Please respond to the Newsgroup, so that others may
benefit from the exchange.
>Peter R. Fletcher
>
>
>----== Posted via Newsfeed.Com - Unlimited-Uncensored-
Secure Usenet News==----
>http://www.newsfeed.com The #1 Newsgroup Service in the
World! >100,000 Newsgroups
>---= 19 East/West-Coast Specialized Servers - Total
Privacy via Encryption =---
>.
>



Relevant Pages

  • Re: median of 3 values.
    ... Your test checks for zero arguments. ... If a median is defined to be a number, ... nil is not an acceptable value to return. ... while ash of a nonnegative integer is trivially always another ...
    (comp.lang.lisp)
  • Re: "Fair (hah) and Balanced (giggle)"
    ... the median number of times a city cop fired his or gun in earnest, ... Meaning that half the cops fired their guns less than zero times? ... officer to fire his gun, for example, 0.34 times. ... Every officer who got shot without returning fire counted as -1 ...
    (rec.arts.sf.fandom)
  • Re: Salaries for Lisp engineers
    ... The median salary for, say, experienced chess players ... is not necessarily zero just because most of them make their living ... I should think the results of such a poll would be subject to ...
    (comp.lang.lisp)
  • Re: Calculate Average in a Query
    ... You can do the average with a horrendous mess of nested IFs to get rid ... of the zero values (is it really zeros you want to ignore - not ... You will have to do the Median with VBA, ... short VBA stub. ...
    (microsoft.public.access.queries)
  • Re: "Fair (hah) and Balanced (giggle)"
    ... When I lived in NYC, about 20 years ago, the NYT reported that ... the median number of times a city cop fired his or gun in earnest, ... Meaning that half the cops fired their guns less than zero times? ... officer to fire his gun, for example, 0.34 times. ...
    (rec.arts.sf.fandom)