How to obtain a percent of entries?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database built that uses yes or no check boxes for the data fields. What I would like to know is this. Is there a way to get a report on what percent of a single field as yes or no answers.(ie. 59% yes , 41% no).
 
SELECT QuestionID,
Sum(IIF(SomeField=True,1,0)) / Count(SomeField) as SomeFieldYPercent,
Sum(IIF(SomeField=False,1,0)) / Count(SomeField) as SomeFieldNPercent
FROM YourTable
Group By QuestionID
 

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

Similar Threads

How to Populate Data from a table to another 0
Access Test if value is less than percent 0
Average Percent 4
calculating a percentage 1
Formula to answer YES or No 4
Queries - Assistance 1
Percent total 101%! 1
Percentages Total 3

Back
Top