0

I have a qrosstab query to find the percentage of the passed students in each class and subject. The qrosstab query that I have includes three columns namely :

Class (Row heading) 
subject (Column heading)
Percentage: (Value)

The percentage field has the following expression:

Percentage:(Count(IIf([Total]>49,1,Null))/Count((IIf([Total]>0,1,Null)))*100 

I got error "overflow", however, it works when I use the following expression:

Percentage: (Count(IIf([Total]>49,1,Null))/Count([Total]))*100

Any help please ?

Note: [Total] >49 means the student is passed,while [Total] >0 means discard the students who has no mark out of the percentage.

FSm
  • 2,017
  • 7
  • 29
  • 55

1 Answers1

0

Try with Sum:

Percentage: Sum(Abs([Total]>49))/Sum(Abs([Total]>0))*100 
Gustav
  • 53,498
  • 7
  • 29
  • 55