Is there a way to use the Count expression in a report so that I may be able
to obtain the total number of a particular input in a column? For example,
if I have a column which contains student marks, in the Text Box control
source I could enter an expression like: =Count([Student Marks]) and this
would output the total number of student marks I have in the column. But if
I wanted to obtain the total number of, for example, students that obtained
an "A", how would I enter the expression in the control source to output this
request? Thanks.
Ofer - 16 Jan 2006 21:10 GMT
Try
=Sum(IIf([Student Marks] = "A",1,0))

Signature
\\// Live Long and Prosper \\//
BS"D
> Is there a way to use the Count expression in a report so that I may be able
> to obtain the total number of a particular input in a column? For example,
[quoted text clipped - 4 lines]
> an "A", how would I enter the expression in the control source to output this
> request? Thanks.
John Spencer - 16 Jan 2006 21:11 GMT
Use Abs and Sum with a boolean expression.
=Abs(Sum([Student Marks]="A"))
> Is there a way to use the Count expression in a report so that I may be able
> to obtain the total number of a particular input in a column? For example,
[quoted text clipped - 4 lines]
> an "A", how would I enter the expression in the control source to output this
> request? Thanks.