Filtered Count Formula Needed

Leesha
BronzeLounger
Posts: 1488
Joined: 05 Feb 2010, 22:25

Filtered Count Formula Needed

Post by Leesha »

Hi,
I have a report that I need to return the total for Female and Male from control [gender]. I tried =count([gender]="F") but it returned the total count for gender not just the female. What am I missing?
Thanks,
Leesha

User avatar
HansV
Administrator
Posts: 78575
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Filtered Count Formula Needed

Post by HansV »

Use

=Abs(Sum([gender]="F"))

[gender]="F" is True=-1 for females, and False=0 for males. So each female contributes -1 to the Sum. Abs removes the minus sign.
Best wishes,
Hans

Leesha
BronzeLounger
Posts: 1488
Joined: 05 Feb 2010, 22:25

Re: Filtered Count Formula Needed

Post by Leesha »

Thanks Hans! I really appreciate the explanation so I understand the rationale for using again in a different scenerio.
Leesha