Hi Mirnalini, please try the method given in this thread to create your sorting.
i.e. create a calculated field ifelse({taxonomy level} = ‘Phylum’, 1, {taxonomy level} = ‘Class’, 2 …), then use Quicksight sort options to make it ascending or descending.