### Title

Calculation for Reports

### Post

I am trying to put a report together that counts the number of certain occurrences per field. I have a calculation field that looks like this;

If( Housekeeping = "Unsafe";

1 ; 0 )

Then I have a summary field that is a count of the calculation field. The problem is, when put into the fields into the report, the counts for "safe" and "unsafe" are the exact same, the numbers are off, but a select few actually display different numbers. Where could I be going wrong?

A count field counts all records where the field is not empty. A record with 1 in the field and a record with 0 in the field are both cases where the field is not empty. Either use a different calculation that leaves the field empty instead of with a value of zero or use a "total" of summary field instead of the "count of" summary field you are currently using.

And

If( Housekeeping = "Unsafe"; 1 ; 0 )

could be simplified to:

Housekeeping = "Unsafe"

and it would still return a value of 1 if equal and 0 if not.