Percent

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have a query that is arranged acorting to a number.

Name Money
Dan $150
Steve $60
Mike $20
Paul $10


for a lot more records of course. but i want to be able to decide the
person who is the lowest one in each percent as in if i wanted
to produce the following output

Percentile Money
90% $150
80% $150
70% $60
60% $60
50% $60
40% $20
30% $20
20% $10
10% $10

is there an easy way to produce this?


Thanks
-Mark
 
Partition() does almost the inverse of what (I think) the OP wants -
it rerurns the number of records with values in a specified range - he
wants the border value of a specified proportion of records.

There is no native Access function which returns percentiles,
quartiles, etc. I have written (and published here previously) a Class
which does the hard work of this, though the OP would need to to write
a bit of VBA code to make use of it for his specific purposes. I will
give another pointer to the package, if he likes.

Hi Mark,

Look up the PARTITION() function in the OLH.

hth,

LeAnne


Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
There's one posted at Dev Ashish's site, too:

http://www.mvps.org/access/queries/qry0019.htm

Another option would be to download the trial version of FMS's "Total
Access Statistics," which calculates quartiles, deciles, and centiles
from the 1th to the 99th %ile. Note that the trial version works on
tables only, not on queries.

hth,

LeAnne
 
Back
Top