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

Calculated column count

Status
Not open for further replies.

Hanzelmans

Technical User
Dec 3, 2003
20
US
I have a master-child list report where I would like to calculate a count of certain rows in the child list.

The child list contains a student name/status/etc. I would like to calculate the total number of students in a course that have a status of "Complete".

I've tried various things, but can't seem to get it to total that correctly.

Any ideas would be great. Thanks!

Steve Hanzelman
Milton Hershey School
 
Try: define [#COMPLETE]

CASE
WHEN
[STATUS] = 'Complete'
THEN (1)
ELSE (0)
END

Then define second calculation:

total ([#COMPLETE] for [course])

Ties Blom

 
Ties,
Thanks. That worked perfectly.

Now for the follow-up question: is it possible to total those totals to get a master figure of all 'Complete' students?

I have tried a few things, but it looks like it doesn't want to allow a total from the detail query be displayed in the master query.

Thanks,
Steve

Steve Hanzelman
Milton Hershey School
 
Where do you want to display the grand total? Depending on which version you are on this might be a suitable case for a singleton. Singletons should have the benefit of being able to be placed everywhere in the report..

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top