Since the field is either 0 or 1, sum the field value should give you a count.
Sum( ) gives you the total
Count( ) gives you the number of non-blank records
And there is more than one way to get that aggregate value (sum in this case):
A summary field might be used
the Sum ( ) function as previously posted here
Sum as part of an ExecuteSQL query
I tried Sum( weight ), and it's retuning only the patients weight in that particular record, not the sum of all weights in all records...
may not be the context you need
field - any related field, repeating field, or set of non-repeating fields; or an expression that returns a field, repeating field, or set of non-repeating fields.
And it appears that you have more than "boolean" values.
1 of 1 people found this helpful
It is your context, use Phil's advice to get a Summary field of a field in the same table. If it were related fields, that would be different and the Sum() calculation function would work.
I suggest that you look up a function in Help before you try to use it.
Sum ( field ) produces the value of field. You've basically asked Filemaker to compute Sum ( 1 ) and the sum of 1 is 1.
Sum can be used in different contexts.
Sum ( RelatedTable::Field )
will return the sum of Field over the set of related records. Bu that means defining your calculation field in a different table than "RelatedTable".
A "Total Of" summary field, on the other hand can return the total of the field it "totals" over the current found set if used in the right context.
Oh, this one does, I was testing in some other fields just to be sure...
I'll look into the context tip...
I did look up...but I obviously didn't understand it...
The summary field worked though...
And thank heavens I don't make a living out of this...rsrsrs