Click here to Skip to main content
15,921,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please I want to add students grades in each subject together to get the total grade. I will like to add only the least six numbers out of the total numbers which are more than six.
I assign numbers to the score which represent the individual grades.

Below is an example of what I mean:
SUBJECT  Score  GRADE
 
Math      80     1
English   60     3
French    70     2
social    42     5
Science   60     3
ICT       80     1
Pre-Tech  60     3
Pre-Voc   50     4


So I want to add six of the grades starting from the least so I can get the best six.
In this case the answer will be 1+1+2+3+3+3= 13
Best six grade= 13

What I have tried:

Tonumber(sum(minimum({@grade}),6))
Posted
Updated 15-Jul-17 22:54pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900