
1. Re: IF A>B THEN
Dmitry Chirkov Jul 24, 2016 11:46 PM (in response to Diogo Braga)2 of 2 people found this helpfulHow do you plan on using result?
If for display purpose only  I'd go with aliases.
As to calculation itself...
Simple way:
CASE [Grade] WHEN "A" THEN 5 WHEN "B" THEN 4 WHEN "C" THEN 3 WHEN "D" THEN 2 WHEN "E" THEN 1 END
Overly complicated way:
IF ASCII([Grade]) >= 65 AND ASCII([Grade]) <= 69 THEN (ASCII([Grade])  70) END
Both will map A to 5 and E to 1.

2. Re: IF A>B THEN
Ashish Chaudhari Jul 24, 2016 11:20 PM (in response to Diogo Braga)1 of 1 people found this helpfulHi Diogo,
If you wish to compare the school grade then I would suggest is to assign the numeric values rather that aliases. I am not sure what exactly your requirement is but this method will help you to compare the grade in between student of a one particular division. You can go further by going calculating Avg/Min/Max grade per division. Then you can calculate the average grade of a class. There are many things you can calculate if you include numeric column for Grades along with alphabets (A,B,C,D,E). At the end this grades are have the numeric ranges thus I would suggest you to include the numbers along with it.
I hope this helps.
Thanks and Regards,
Ashish Chaudhari

3. Re: IF A>B THEN
Tableau kumar Jul 24, 2016 11:41 PM (in response to Diogo Braga)1 of 1 people found this helpfulWe can compare Numerical Data in easy way,
I can suggest Convert Grades into Integers, then implement the IF THEN approach.
1) Convert grades into Integers
Name: Grades  Decode
Syntax:
if [Grade]="A" then 1
elseif [Grade]="B" then 2
......
End
2) Now we can compare the Grades easily.
I assume Grade  A is the toppest , B, C... are following of next grades.
3) Max([Grades  Decode)
I hope this approach helps you.
Best Regards
Kumar

4. Re: IF A>B THEN
Diogo Braga Jul 25, 2016 10:30 AM (in response to Dmitry Chirkov)Dmitry Chirkov, the display needs to be letters, converting to integers is for calculation purposes.
My dataset has column names: ID, Year, School Grade
I only need the school grade converted to integers if Year=2015
What I really need is to compare school grades actual with school grades goals for the year 2015.
Still unclear how to proceed with the conversion to integers though.