iif problem

G

Guest

Hi there,

In my report, my data looks something like this:

Group 1 M 10
F 8
Group 2 M 12
F 10
etc

I have tried to get a text box to add up just the Males and of course I will
need another one to add up just the females.
I have tried the following:
=IIf([Gender]="m",Sum([GenderCount]),0)
[Gender] of course is the middle column and [GenderCount] is the actual
number. I end up getting a total for the entire group and not the specific
gender. What am I doing wrong here or can someone suggest something else?
Thanks,

John
 
F

fredg

Hi there,

In my report, my data looks something like this:

Group 1 M 10
F 8
Group 2 M 12
F 10
etc

I have tried to get a text box to add up just the Males and of course I will
need another one to add up just the females.
I have tried the following:
=IIf([Gender]="m",Sum([GenderCount]),0)
[Gender] of course is the middle column and [GenderCount] is the actual
number. I end up getting a total for the entire group and not the specific
gender. What am I doing wrong here or can someone suggest something else?
Thanks,

John

=Sum(IIf([Gender]="m",[GenderCount],0)
=Sum(IIf([Gender]="F",[GenderCount],0)
 
G

Guest

Hey, thanks that was really helpful!

JR
--
www.brightfuture.ca/bright
My email address can be found on my site.


fredg said:
Hi there,

In my report, my data looks something like this:

Group 1 M 10
F 8
Group 2 M 12
F 10
etc

I have tried to get a text box to add up just the Males and of course I will
need another one to add up just the females.
I have tried the following:
=IIf([Gender]="m",Sum([GenderCount]),0)
[Gender] of course is the middle column and [GenderCount] is the actual
number. I end up getting a total for the entire group and not the specific
gender. What am I doing wrong here or can someone suggest something else?
Thanks,

John

=Sum(IIf([Gender]="m",[GenderCount],0)
=Sum(IIf([Gender]="F",[GenderCount],0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top