davehob

Deriving stats - via Find, or via Summary fields?

Discussion created by davehob on Mar 7, 2012
Latest reply on Mar 8, 2012 by Malcolm

In my solution, I’m dealing with Attendance records and their related People records.

 

Given a set of Attendance recs (which I’ve isolated, via a GTRR, by date range specified by the user), I then need to some analysis of the related People records. So I’m doing a further GTRR to isolate the related People recs.

 

I then need to find, within that set of records, the number of men, women, disabled people, people over 60, etc. (about 10 criteria at the moment, probably more in the future).

 

I’m trying 2 different approaches, and wondered whether either of these is better than the other, or whether there’s another, better, way that I’ve missed.

 

Approach 1 – I obtain the stats via a succession of Finds. So, for example, to get the number of women, I do a “Constrain Found Set” with the gender field set to “F”, store the found count in a variable, go back to the full set of records (by repeating the GTRR), do the next find, and so on.

 

Approach 2 – I add a calc field to the People table for each of the criteria, e.g. PPL_x_Female, which is defined as Case (PPL_Gender = "F";1;0). I then have a corresponding summary field for each criterion, PPL_xs_Female, defined as a Total of PPL_x_Female, to give me the total no. of women in the current found set.

 

I feel that approach 2 is better, although I’m worried about the no. of extra fields that I’ll accumulate in the PPL table.

 

Any recommendations as to which approach (if either…) to use? I really need to settle on the best technique at the outset, as I’ll be using it very widely in the system, and would really appreciate your guidance.

 

Thanks in anticipation,

 

Dave.

Outcomes