Jack Jarvis Posted July 28, 2005 Posted July 28, 2005 I have a calculated average field that averages several fields in a record; the calculation returns a number with two decimal spaces ( 3.55, 4.76,etc). I would like to set ranges that would return a letter grade (10-9= A, 8-8.9= B, etc. ) into another field. Any ideas? I will be looking through resources and will post if I find answer. Thanks, Jack J
PeterHW Posted July 28, 2005 Posted July 28, 2005 Hi Jack, make a calculation field, result Text Case( AverageResult>=9 and AverageResult<10;"A"; AverageResult>=8 and AverageResult<9;"B"; "C" ) In the above example, "C" will be the outcome if none of the other two conditions are met, but you can just continue adding lines for other grades. HTH, Peter
comment Posted July 28, 2005 Posted July 28, 2005 A compound test is redundant in this case Case ( Avg >= 9 ; "A" ; Avg >= 8 ; "B" ; "C" ) will produce the same result. If, as it seems, the grade is a function of the integer of the average, Choose() would be the more efficient choice: Choose ( Avg ; "J" ; "I" ; "H" ; "G" ; "F" ; "E" ; "D" ; "C" ; "B" ; "A" )
PeterHW Posted July 28, 2005 Posted July 28, 2005 Yes, you are correct, the extra test is not required. Regarding Choose(), I believe this type of grading is not directly a function of the integer of the score. What I could gather from the web quickly is the following A Excellent, 91% or more B Good, 82% to 90% C Fair/Average, 75% to 81% D Poor, 69% to 74% F Failing, 68% or less But that of course depends on the application of the OP (who has stated that 9-10=A, 8-9=B so maybe it is dependent on the integer). In any case, using Case or Choose should answer his question. Regards, Peter
Jack Jarvis Posted July 30, 2005 Author Posted July 30, 2005 Many thanks to both of you. The Case function I get, I'm not so sure about Choose: my understanding would be if I have a ten point scale and use Choose, it would match the scale with one of ten letter grades. I only need 5; therefore if I used Choose( Ave; "F" ; "D" ; "C" ; "B" ; "A" ) would it work agaist the ten point scale? I will experiment with both. Reply if you wish. Again thanks for the assistance! Regards, Jack
comment Posted July 30, 2005 Posted July 30, 2005 No, but Choose ( Avg ; "F" ; "F" ; "F" ; "F" ; "F" ; "F" ; "D" ; "C" ; "B" ; "A" ; "A" ) might. It all depends on what's behind the "etc." of your original post.
Jack Jarvis Posted July 31, 2005 Author Posted July 31, 2005 (edited) I tried the Choose ( Avg ; "F" ; "F" ; "F" ; "F" ; "F" ; "F" ; "D" ; "C" ; "B" ; "A" ; "A" ) It said field could not be found. I'm assuming your using Avg as the field name.....so I substitued the name of one of the fields I'm trying to convert. That didn't work either. Then I substituted commas for the semi-colons: Choose( Reading , "F" , "F" , "F" , "F" , "F" , "D" , "C" , "B" , "A" , "A" ) This returned a letter in the field but then when I changed the scores that were part of the Reading field average, the letter grade remained constant. I'm close but no cigar yet! I'm sure I am missing a step somewhere and will keep at it. Reply if you wish-thanks much! Jack Edited July 31, 2005 by Guest
comment Posted July 31, 2005 Posted July 31, 2005 Ah, version 6 - sorry, missed that. Yes, you need commas instead of semi-colons. Other than that it should work. You are using a calculation field, not an auto-enter calculation, I hope?
Jack Jarvis Posted August 2, 2005 Author Posted August 2, 2005 Correct...I got a letter grade to appear, which is great.....but I was hoping to build the field so that as the teacher updates the student progress, the letter grade changes as the average goes up or down based on student work......I'm not using repeating fields for the scoring.......for example for standards 1, 2, 3, and 4, a student gets a 5, 7, 8, and 4, which averages to a 6...since we revisit content standards, he may improve in two weeks so his scores become 6, 8, 9, 9.....at that point I would like the letter grade to change based the new info.......Hope this helps and is not just babble. Reply if you have any ideas...thanks Jack
TSilvan Posted August 2, 2005 Posted August 2, 2005 Jack, If the "Reading" field is in the same file as your Choose calculation, then the Choose calculation should be triggered to change whenever the Reading field changes. If not, then the Choose calc will have to be unstored and will only update when the screen is refreshed/redrawn.
comment Posted August 2, 2005 Posted August 2, 2005 I have lost you somewhere. So far, the question was how to return a letter grade from a number. Now it seems that your number does not update the way you want. But you haven't told us how you compute the average (as a number). Is there a relationship from Student to Grades, or something like that?
Jack Jarvis Posted August 4, 2005 Author Posted August 4, 2005 Dear T.... Yes thats what I am looking for. How do I do that? I will try to figure that out.....reply if you wish. Thanks. Dear Comment, I appreciate your patience. The average is computed like this.... 5 fields named R1, R2, R3, R4, R5 are averaged to 1 field named Reading.......the Choose calc field returns a letter grade based on the Reading field average. But it never refreshes. Hope this helps...I will look up refresh and redraw in the forums... Thanks again. Jack
comment Posted August 4, 2005 Posted August 4, 2005 I don't see why there should be any problems in refreshing. avg.zip
PeterHW Posted August 4, 2005 Posted August 4, 2005 (edited) The only possible cause I can see for your "calculation" not updating, is if you have defined the field as a text field, with an auto-enter calculation in stead of defining the field as a calculation. If this is not the case, please post a sample file. Regards, Peter Edited August 4, 2005 by Guest
Jack Jarvis Posted August 5, 2005 Author Posted August 5, 2005 I got it, guys. It all had to do with the way I was storing the calculation. Many thanks for the sample file, Comment. Your script was exactly like mine, so I compared every part and noticed you had the storage options set differently. I then went back and did the same in all the fields included in the average. I will read up on the storage options. You guys rock! Jack
PeterHW Posted August 8, 2005 Posted August 8, 2005 Your script was exactly like mine Hi Jack, just a brief note, but this is no "script" but a (calculation) field. Scripts are made in Scriptmaker and consist of a sequence of steps to automate certain tasks. Regards, Peter
Recommended Posts
This topic is 7146 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now