Count number of records for criteria for each field (1 Viewer)

cmray58

Registered User
Joined
Mar 24, 2014
Messages
70
I'm trying to develop a query that provides a count of the number of records where a certain criteria is true for each field, individually.

I.e.,

How many records where Field 1 = Yes
How many records where Field 2 = Yes
How many records where Field 3 = No etc...

But, I don't want it to be an and or an or statement. I want to know the total number of records for each criteria above. I currently have it set up as the attached screenshot, but that of course results in an and statement.
 

Attachments

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,658
Hi. If you want to "count" fields, you could try using the Sum() function. For example:
Code:
Sum(IIf([FieldName]=True,1,0))
Hope it helps...
 

Pat Hartman

Super Moderator
Staff member
Joined
Feb 19, 2002
Messages
28,533
Or

Sum(Abs(FieldName))
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom