Counting number of records in group with criteria

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

Guest

I've been trying all the suggestions for counting "yes" records in a group;
however, I can't get it to work with numeric values.

I successfully counted the number of record in the group; however, I also
need a count of the number of records in the group that have a value greater
than null or 1 in the field. I've tried adding quotes, single quotes, etc.,
but no luck.

Appreciate your help!
 
Perplexed said:
I've been trying all the suggestions for counting "yes" records in a group;
however, I can't get it to work with numeric values.

I successfully counted the number of record in the group; however, I also
need a count of the number of records in the group that have a value greater
than null or 1 in the field. I've tried adding quotes, single quotes, etc.,
but no luck.


In the group header of footer:

=Count(IIf(thevalue > 2, 1, Null))
or
=Sum(IIf(thevalue > 2, 1, 0))
or
=Abs(Sum(thevalue > 2))
or
=-Sum(thevalue > 2)
or lots of other variations on these themes.

However, there is no such thing as greater than Null, but if
you just want to count the non-Null values in a field you
can just use Count. It ignores Null values.

=Count(thevalue)
 
Back
Top