counting checkboxes

  • Thread starter Thread starter bcasper
  • Start date Start date
B

bcasper

How do you count a check box when it is checked??? I've
tried used the command "=Count([Checkbox1])" and
"=Count([Checkbox1]=-1)" and =Count([Checkbox1]=True)" but
none of that seems to track when a check box is checked.
The only formula that seems to keep track is
"=Sum([Checkbox1])" but that will display negative
numbers. Shouldn't the count function work or is there a
better way to do this???
 
bcasper said:
How do you count a check box when it is checked??? I've
tried used the command "=Count([Checkbox1])" and
"=Count([Checkbox1]=-1)" and =Count([Checkbox1]=True)" but
none of that seems to track when a check box is checked.
The only formula that seems to keep track is
"=Sum([Checkbox1])" but that will display negative
numbers. Shouldn't the count function work or is there a
better way to do this???


You're on the right track, but missing the concept that all
the aggregate functions ignore fields with Null values.
Additionally, Count counts all non-Null values, so
Count(Checkbox1) will count both the true and the false
values.

The Sum function will work because True is -1, and False is
0, so Summing will only add up the True values. Just use
the Abs function or a minus sign to make the total positive:
=Abs(Sum(Checkbox1))
 
Back
Top