7 Replies Latest reply on Jun 28, 2010 10:41 AM by Jasonix

# I think it's conditional?

### Title

I think it's conditional?

### Post

My database has students who are awarded - Pass, Merit or Distinction for each unit they complete.  These three grades need numerical values attached.  Pass = 2  Merit = 4 Distinction = 6 in order to work out there final grade points.  How can I add these values up in a new field to show totals of each unit completed?

• ###### 1. Re: I think it's conditional?

Case ( Grade = "Pass"  ; 2 ; Grade = "Merit"  ; 4 ; Grade = "Distinction"  ; 6 ; 0 )

Finally average the GradeValue Fields and translate the result back to text. Hope this helps

• ###### 2. Re: I think it's conditional?

Thanks for the reply, however I could do with a atep by step as I'm a bit of a newbie:-)

• ###### 3. Re: I think it's conditional?

it would help to know how your database is designed? Do you have a record per each student with various fields for each grade?

• ###### 4. Re: I think it's conditional?

Yes it has a record for each student with fields created for each grade they attain.  It is set out as 6 fields for the 6 grades - These 6 grades add up to make a unit total.

• ###### 5. Re: I think it's conditional?

Create a new calculation field called FinalGrade with the following calculation:

This will return the average score in a numeric value. Hope this helps

• ###### 6. Re: I think it's conditional?

For proper structure, each grade should really be its own related record not individual field.

That being said, the calc for total score could probably just be ( as long as there arent any invalid values ):

Evaluate ( Substitute ( List ( G1; G2; G3; G4; G5; G6 ); [ "Pass"; 2 ]; [ "Merit"; 4 ]; [ "Distinction"; 6 ]; [ "¶"; "+" ] ) )

• ###### 7. Re: I think it's conditional?

Thanks very much for your time on this, much appreciated:manhappy: