Kurt Knippel Posted January 2, 2002 Posted January 2, 2002 code: CASE ( Result >= 93 = "A+" Result < 92 and Result >= 88 = "A" ) ...and so on.
The Bridge Posted January 2, 2002 Posted January 2, 2002 quote: Originally posted by gnault: if the result is between 93 and 100 = A+ if the result is between 92 and 88 = A Where it gets complicated, it's when the result is 92,6... I need to make sure it equals 93 to get A+... This is a fun sort of calculation. Assuming result is the name of the field that contains the number grade, try this: Letter_Grade (unstored, text)=Case(result<60, "F", result<75, "D", result<82, "C", result<88, "B", result<93, "A", result<100, "A+", "Scored higher than 99 somehow") The Case() function will return the *first* true result. I made up my own grades above; you can play with the number values and their corresponding letter grades for your purposes.
Newbies gnault Posted January 2, 2002 Newbies Posted January 2, 2002 Hi, Thank you for responding so fast. I tried to copy both calculations, but I get a message saying: An operator (eg. +, -, *, /) is expected here. And the first option in "" is highlighted. I have filemaker pro 5v3. I weht in the file menu, define field, typed the field "grade" then hit "calculation", copied the calculation your offered and got the error message. Any clue ? Gen x
The Bridge Posted January 2, 2002 Posted January 2, 2002 Sorry, this should be more clear: Define a new field, Letter_Grade (or Grade, whatever you wish). Make it a calculation. In the define calculation window that appears, paste the following: Case(result<60, "F", result<75, "D", result<82, "C", result<88, "B", result<93, "A", result<100, "A+", "Scored higher than 99 somehow") Change any instances of "result" in the above with the actual name of the field that you want to base the letter grade on, otherwise FileMaker will give you an error. Hope this helps! [ January 02, 2002: Message edited by: The Bridge ]
Newbies gnault Posted January 3, 2002 Newbies Posted January 3, 2002 Thank you the Bridge... It worked when I changed the , with ; Case(Note finale<60; "F"; Note finale<75; "D"; Note finale<82; "C"; Note finale<88; "B"; Note finale<93; "A"; Note finale<100; "A+"; "Scored higher than 99 somehow") isn't that weird ?? Gen
Newbies gnault Posted January 3, 2002 Newbies Posted January 3, 2002 Hi, I'm trying to translate (convert) a range of result to a specific grade. In the field "result", which is a calculation of several other fields, I have numbers varying from 60 to 99. In the field "grade", I would like to convert the results: if the result is between 93 and 100 = A+ if the result is between 92 and 88 = A Where it gets complicated, it's when the result is 92,6... I need to make sure it equals 93 to get A+... Any clue how I can do that ? Thanks for helping out a newbie! Gen
Geeksharka Posted January 3, 2002 Posted January 3, 2002 The difference between , and ; is due to FMP country versions. US version use the , Others, such as Canada I'm assuming, use the ; This is mostly because in Europe they use a comma as a decimal point, and so that could confuse the Calc.
Newbies gnault Posted January 3, 2002 Newbies Posted January 3, 2002 Thanks Sharka, the country differences could explain it. Glad you took time to let us know. Gen
The Bridge Posted January 3, 2002 Posted January 3, 2002 quote: Originally posted by Sharka: The difference between , and ; is due to FMP country versions. US version use the , Others, such as Canada I'm assuming, use the ; This is mostly because in Europe they use a comma as a decimal point, and so that could confuse the Calc. Thanks for the clarification, Sharka... I should have clued in that gnault was using a different system format from the original example of 92,6. FWIW, Canada is a wonderfully unusual beast, what with two official languages: in my part of the country I use comma delimiters; in gnault's part of the country the semi-colon is proper. I'm still not sure what the proper date format is around here.
Geeksharka Posted January 3, 2002 Posted January 3, 2002 Yep, and it only gets better. Now, all Euroland countries will be officially using a decimal point instead of a comma (US style). However, all the Euro-versions of FMP are still set to only accept numeric entry 'comma' style. Major pain for data entry, no matter how it winds up format wise. Upside is, if you're building for oversea clients, all you need is one table from their foreign FMP version, and use it as a master. All of its clones will follow the data-entry rules for that country, for both numbers and dates.... but I digress.
BobWeaver Posted January 3, 2002 Posted January 3, 2002 Gee, what ever happened to Pounds, Shillings and Pence and the slash separator? Hmm, I Guess it would be confused with the division operator. FWIW, I now use the format YYYY-MM-DD on all my date fields unless my client specifically tells me to do otherwise (so far no one has complained). With this format, there is never any question whether month comes before day or not because they are in order of decreasing significance. Hence, the field will always sort properly even if it's set up as text.
Recommended Posts
This topic is 8431 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