@deelasha please refer this community post - Sorting by multiple columns for sorting multiple columns using rank function