5 Replies Latest reply on Oct 2, 2012 7:19 AM by Lisa Lacroix

# How can I convert letter grades to numbers so I can calculate a GPA?

I have a field with letters grades (A+, A, A-, B+, etc.) that I would like to convert to numbers so I can calculate a GPA.  For example, B+=3.7, B=3.3, B- = 3.0.  Thanks!

• ###### 1. Re: How can I convert letter grades to numbers so I can calculate a GPA?

The best way would be with a calculated field:

CASE [Grade] when "A" then 4

when "B" then 3

when "C" then 2

end

• ###### 2. Re: How can I convert letter grades to numbers so I can calculate a GPA?

Thank you! That part worked.  Now how do I get the average for each student? I assume I need a calculated field to average the set of grades for each student but I'm not sure how to do that. Thank you!

• ###### 3. Re: How can I convert letter grades to numbers so I can calculate a GPA?

Here's what I have

• ###### 4. Re: How can I convert letter grades to numbers so I can calculate a GPA?

GPA needs to be turned to a measure (drag it down from Dimensions if it's there). I assume you are averaging across all courses, so get rid of Course from the row. Then when you score over to rows, you will want to right click, change the aggregation to avg, and probably turn it to discrete (also a right click).

On your learning journey, you may want to look at the training videos on this site, and perhaps buy Stephen McDaniel's excellent book: http://www.amazon.com/Rapid-Graphs-Tableau-Software-Actionable/dp/1448642507

1 of 1 people found this helpful
• ###### 5. Re: How can I convert letter grades to numbers so I can calculate a GPA?

Thank you. That worked. For anyone else out there needing this help, I did have to create another calculated field in order to convert the GPA to a measure:

FLOAT [GPA]

After that, it worked beautifully.  Appreciate your quick help.