Count Yes/No with Criteria

L

Lynn

I have created a summary query using the Totals button. My Group By field is
Employee ID & my Count field is Attended. Attended is a Yes/No data type.
When I have no criteria in the Yes/No field, it counts the records properly
but when I add No in the Criteria line, the query returns no records.

How can I group by Employee ID & count the number of instances where
Attended = No?
 
K

KARL DEWEY

Use calculated field like this --
Not_Attend: IIF([Attend]=0,1,0)
Then set the Group By to Sum.
 
L

Lynn

Thanks so much Karl! This worked perfectly

KARL DEWEY said:
Use calculated field like this --
Not_Attend: IIF([Attend]=0,1,0)
Then set the Group By to Sum.
--
KARL DEWEY
Build a little - Test a little


Lynn said:
I have created a summary query using the Totals button. My Group By field is
Employee ID & my Count field is Attended. Attended is a Yes/No data type.
When I have no criteria in the Yes/No field, it counts the records properly
but when I add No in the Criteria line, the query returns no records.

How can I group by Employee ID & count the number of instances where
Attended = No?
 

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