how do I count yesses and nos

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

Guest

I have a database of survey responses that I need to analyze. Many questions
were yes and no toggles and I need to count up how many I received and
analyze across other info I also received. I can't figure out how to count
up the total number of yeses and nos in a report or in a query to get to a
report.
 
Yes is -1, No is 0. Therefore, you could sum the field, and take its
absolute value, and that will give you the number of yeses.
 
LindaTheSurveyer said:
I have a database of survey responses that I need to analyze. Many questions
were yes and no toggles and I need to count up how many I received and
analyze across other info I also received. I can't figure out how to count
up the total number of yeses and nos in a report or in a query to get to a
report.


There are any number of expressions using the Sum or Count
aggregate functions. Here's a few that will count the True
values in the reponse field of the report's record source
query:

Count(IIf(response, 1, Null))
Sum(IIf(response, 1, 0))
-Sum(response)

Add the Not operator before the response field name to count
the False values.

If you use those expressions in a group/report footer
section text box (instead of in the record source query), be
sure to put an = sign in front.
 

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

Back
Top