Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totals by field values

Status
Not open for further replies.

JSMITH242B

Programmer
Mar 7, 2003
352
GB
Hi Group,
I can't seem to create independent totals using a field. I have a title field twhich could hold any of the following values: "Mr", "Miss","Ms" or "Mrs".

I want a total number of records where the value is "Mr" to give me the total number of Males, and another where the valuee are in "Miss","Mrs" or "Ms" to give me the number of females. No matter what I do, I do not get the expected results.

Any help is much appreciated.

TIA
Jackie
 
You can either use 2 Running Totals or create 2 formulas to sum, in either case, this will differentiate them:

Formula version:

@male
If {table.Field} = "Mr" then
1
else
0

@Female
If {table.Field} <> &quot;Mr&quot; then
1
else
0

Place these 2 formulas in your detail section, right click them and select Insert Summary->Sum.


For Running Totals, place the following in the Evaluate Use a Formula:

#Male RT:
{table.Field} = &quot;Mr&quot;

#Female RT:
{table.Field} <> &quot;Mr&quot;

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top