View Full Version : Calculate percentage


depawl
03-22-2008, 06:13 PM
In a report, I need to calculate the percentage of clients that respond "Yes" to a question on a survey. I need to create a query that will return the count of the number of "Yes" responses, and the number of total responses.
For example, if 10 clients complete the survey, and seven respond "Yes", I need the 2 fields in the query to be 7 and 10. So far, I have only been able to do this using multiple queries.
Thank you.

boblarson
03-22-2008, 07:08 PM
Put a text box for the Yes Count and do this in the control source of the text box:

=Sum(IIf([YourResponseFieldName]="Yes",1,0))


And for the total:

=Count([YourResponseFieldName])