Count Number of Yes in Column

  • Thread starter Thread starter Ed C
  • Start date Start date
E

Ed C

I have a report that displays a column of eiter 'yes' or 'no' for each
record. I would like to total (count) the number of 'yes' records.

Tried '=count([Notified]) but that didn't work. What will?

Thanks,

EdC
 
I have a report that displays a column of eiter 'yes' or 'no' for each
record. I would like to total (count) the number of 'yes' records.

Tried '=count([Notified]) but that didn't work. What will?

Thanks,

EdC

If this is NOT a Yes/No check box field:

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

If it is a Check Box field:
=Abs(Sum([Notified]))
 
Thanks but didn't work. Error message says,
"Data type mismatch in criteria expression"

Is it the '1' in the second argument??? Maybe it too should be 'yes'

EdC

=count(IIf([Notified]= "yes",1,0))

-----Original Message-----
I have a report that displays a column of eiter 'yes' or 'no' for each
record. I would like to total (count) the number of 'yes' records.

Tried '=count([Notified]) but that didn't work. What will?

Thanks,

EdC


.
 
Thanks to two of you!! The abs(sum) idea worked.

This worked. I understand the logic since 'yes' is typicall a '-1' . Had my
mind on counting not summing!!

Thanks Again

EdC


Eric Blitzer said:
try
=Abs(Sum([notified]="yes"))

Eric

Ed C said:
I have a report that displays a column of eiter 'yes' or 'no' for each
record. I would like to total (count) the number of 'yes' records.

Tried '=count([Notified]) but that didn't work. What will?

Thanks,

EdC
 
If the Notified field is a text field containing the letters
y, e and s, then that should be:

=Count(IIf([Notified]= "yes", 1, Null))

since Count will count any non-Null value (the 1 can be any
non-Null value).

OTOH, If Notified is a Yes/No field then it should be:

=Count(IIf([Notified ]= True, 1, Null))
or just
=Count(IIf([Notified], 1, Null))
--
Marsh
MVP [MS Access]



=count(IIf([Notified]= "yes",1,0))

-----Original Message-----
I have a report that displays a column of eiter 'yes' or 'no' for each
record. I would like to total (count) the number of 'yes' records.

Tried '=count([Notified]) but that didn't work.
 
Back
Top