cancel
Showing results for 
Search instead for 
Did you mean: 

Counting Patients one time

Former Member
0 Kudos

I have a data set that has patients who have their main Doctor. We are doing a count per Doctor ( of patients); but also we include their classification;

if they are considered sick or regular.

Within sick we have 3 types. Let's just call it A, B, or C.

The thing is, some patients have diagnosis for all 3 as well as regular; many have 2 + regular, and 1 + regular.

So we don't want to count the patient 4 times but only once. We would want for example, if they have A as well as others, the patient would be Diag/ A

if B, B etc. and then only show them one time with the 'A' or 'B' etc.

How do I make such a formula to decide how to show only one row?

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Paul,

1) Insert a group on the Patient field.

2) Create a formula with this code to sort the diagnosis:

If {diagnosis} = 'A' then 1

else If {diagnosis} = 'B' then 2

else 3

3) Add this formula field to the 'Record Sort Expert' below the Patient Group.

4) Move all fields from the Details Section to the Group Header/Footer of the Patient Group.

5) Expand Field Explorer > Running Total fields > New.

Use the Patient Field as the Field to Summarize > Use 'Distinct count' as the summary operation > Set the Reset to what group is above the Patient Group.

6) Drag and drop the Running Total on the Group Footer that is below the Patient Group.

-Abhilash