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

Distinct Count in level 3 group, how to count these in lever 2 group?

Status
Not open for further replies.
Joined
Jul 15, 2008
Messages
8
Location
GB
Hi,

Basically I have a report broken down into three groups. On the basic group level 3 I am doing a distinct count of the number of students, which works a treat. The problm being, in the next group level, I have done another distinct count to get the total of these groups, BUT the students may appear more than once in the lower group, so the total of the second group is lower, because I have a distinct count on this. Is there any way I can count the group totals in the lower level, to get the correct total in the next level up?

eg:

group two total: 100
(should be total of area 1,80 and 2, 30 which equals 110)

group one area 1 80
group one area 2 30

Thanks!!
 
Create a formula field that combines Area and Student, e.g.
Code:
{Area} & "/" & {Student}
Do a Distinct Count on '@Combined'. That should give you 110 in the case mentioned.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hi,

I've tried the formula, it returns the correct number on a normal count, but just returns 1 for a distinct count.
 
Please identify the three fields you are grouping on and identify which groups they are.

-LB
 
What level are you counting at? You'd probably get one if it was giving results at the lowest level rather than the top level. Right-click and this can be changed.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top