View Single Post
  #2  
Old July 9th, 2008, 02:04 PM posted to microsoft.public.access.queries
Michel Walsh
external usenet poster
 
Posts: 2,404
Default Percentile Formula for Access

If the is no null in the field, you can try

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


The expression does not work if you use a coma as decimal delimiter, in that
case, change

X * DCount("*", TName)

to

INT(X * DCount("*", TName))



Vanderghast, Access MVP


"ZombieGeoff" wrote in message
...
I am trying to create a query that will calculate the 25th, 50th, and 75th
percentile of salaries within specific job codes. I currently have a table
of
all the job codes I am looking for and it is linking to a table of all the
employees in the company (which includes their job codes and salaries).
Does
anyone know the formula to calculate this?

The field names I am using a
[JobCode] = Specific Job Codes I am looking for
[CountofID] = Number of employees in the job
[AnnualRate] = Current Salary

I know in excel the formula is =Percentile(array,x). This is an ongoing
project and the list of jobs will constantly change (as well as the # of
employees in each job code) and am trying to get away from doing this in
excel.

Any help would be greatly appreciated!