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!

Gradebook expression

Status
Not open for further replies.

ISTodd

Technical User
Mar 25, 2004
43
US
I have a gradebook database. I would like to DROP the lowest test grade in a particular subject (not necessarily all subjects). Is there an expression I could write on a report (possibly query) to give me the average of all tests (not including the lowest grade?

Currently I have my average formula (in class header of Report)

text83 Sum([score])
text84 Sum([maxpoints])
text85 [text83]/[text84]

Thanks for any help anybody could offer.. Todd
 
Todd
Try this... (and in this example I am using Grade as the field - your field will probably be different)

1. Create a Totals query based on your table of grades.
2. Create a Sum column, to give you the total of all grades.
3. Create a Min column, to pull out the lowest grade.
4. Create an Expr1 column, your Sum column minus your Min column
5. Create an Expr2 column, Count(Expr1) - 1
6. Create an Expr3 column, Expr1/Expr2, to give you the average of all but the Min grade.

The SQL for this example is...
SELECT Sum(tblGrades.Grade) AS SumOfGrade, Min(tblGrades.Grade) AS MinOfGrade, [SumOfGrade]-[MinOfGrade] AS Expr1, Count([Grade])-1 AS Expr2, [Expr1]/[Expr2] AS Expr3
FROM tblGrades
ORDER BY Sum(tblGrades.Grade);


Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top