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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Formula

Status
Not open for further replies.

slicknick515

Technical User
Aug 27, 2009
15
US
Hi everyone:

Here is the data example->

Transactions Table
Gender PatientID TxID
M 1 655
M 2 159
M 11 712
F 14 888
F 22 098
M 34 112

I have a distinct count of PatientID in the transactions table. Now I want to be able to display the number of females and males from the Gender column of the patient distinct count.

So in this case I would have a total of 6 distinct patient with 4 males and 2 females.

I tried using summaries of formulas (if gender="M" then 1 else0) and record counts but havent been able to get accurate values.
 
I think you could use two running totals.
Males - field to summarize, PatientID
Type of summary, Distinct Count
Use a formula, {Gender} = "M"

Females - field to summarize, PatientID
Type of summary, Distinct Count
Use a formula, {Gender} = "F"

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top