Hi bhagath, by having the Name field first on the row shelf you are telling Tableau to make each name its own partition so there is nothing to sort. If you move the Class field to first position then you will be able to sort all the fields to the left of it (including the calculated fields) using the one-click sort in the column headers.
(The last four sort icons show up when you hover over them.)
If you don't want to show the Class column, but you still want it available for sorting, un-check the Show Header option:
Hope this helps.