working out the percentile

  • Thread starter chris0309 via AccessMonster.com
  • Start date
C

chris0309 via AccessMonster.com

Hi All,

I have got a column in a table for success rates, the column contains either
0 for success or 1 for failure. Im looking for a way to calculate the
percentile, that is what percent of the tests were successful.

Any suggestions would be really appricated.

Thanks,

Chris
 
M

Michel Walsh

SUM(field) / COUNT(field) for the % of failure


and 1 - SUM(field) / COUNT(field)


to get the % of success (expressed as a decimal value, not as a % values,
ie, 0.25 instead of 25% )


Vanderghast, Access MVP
 
M

Marshall Barton

chris0309 said:
I have got a column in a table for success rates, the column contains either
0 for success or 1 for failure. Im looking for a way to calculate the
percentile, that is what percent of the tests were successful.


I think this is will do what you ask:

SELECT Sum(1 - thefield) / Count(*) As PercentSuccess
FROM thetable

But I suspect there is more to whatever you are trying to
accomplish.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top