Count Boolean Values

Good afternoon!

I have a table that contains the following (Note; only one table no links to other tables)
I need to count the number of records that have the field NoValidAddress = Yes
(boolean, yes if not valid address, no if a valid address).  No matter what I try, I count all of the records in the table - any help would be great appreciated!

Thanks very much,
Colleen Slater Table View Table View
rporter45Asked:
Who is Participating?
 
mlmccCommented:
Try this

Add a formula to the report
If {BooleanField} then
   1
Else
   0

Put it in the details section
Right click it
CLick INSERT --> SUMMARY
Choose type as SUM
Put it in the appropriate footer

You can delete the formula from the details section

mlmcc
0
 
rporter45Author Commented:
Fantastic!  It worked perfectly - If you do have a moment, can you please explain the logic?  From my limited perspective on Crystal, the field values were already 1 and 0 but we declare the same again.  

Thanks very much!  

cms
0
 
mlmccCommented:
As far as Crystal is concerned the values are TRUE and FALSE which arent numeric.  The IF provides the values 1 and 0 so the sum can be done.

If you need to count the false values
If  NOT {BooleanField} then
   1
Else
   0

mlmcc
0
 
rporter45Author Commented:
Sounds extremely sensible now that you have explained!  Thank you for this,

cms
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.