One approach: create a calculation field as field1 = "Yes" and sum that field – or use Case ( field1 = "Yes" ; anyResult ) and count it. (Counting the first calc field would be pointless, because it either holds 1 or 0, but is never empty.)
Other approach: If field1 is essentially Boolean, use 1/0 instead of Yes/No, then sum that field directly.
Hey Oliver, thanks for the prompt reply you have always been a life saver for me. In the other approach, all I have to do is use: If(Field1="Yes", 1; 0). Am I correct? If correct, then I will need to get the sum for each of the fields and then sort the fields to get the state summary. Is this step also correct. Also, is there a way to automate If(Field1="Yes", 1; 0) for all the fields? Thanks a lot!
I did try what I was asking guidance for; the calculation field: Sum(Field1) is blank even after the field has been sorted.
In the other approach, all I have to do is use: If(Field1="Yes", 1; 0). Am I correct?
If you're summing that calc field to get the count, you can simply write
Field1 = "Yes"
which is 1 or 0.
the calculation field: Sum(Field1) is blank even after the field has been sorted.
You misunderstood me.
• a text field (field1) that is "Yes" or "No".
You need in addition:
• a calc field (say, cField1Yes) as field1 = "Yes"
• a summary field as TotalOf: cField1Yes.
It is this summary field that will show you the correct results, as per its placement in a Grand Total or Sub-summary parts.
And the alternative:
Switch your field1 to be a number field where 1 means Yes, 0/<empty> means "No".
Then you'd only need
• a summary field as TotalOf: field1