Well, this was a really very super interesting problem which has been posted onto the Forum. The reason why this problem occured is because a “Sort Order” has been applied on the “MonthInCalendar” field. That is, “MonthInCalendar” field is being sorted by the field “MonthnYear” and due to this an unexpected behaviour was witnessed in ranking.
In order to achieve the results in this type of scenario. Below is the measure alongwith the screenshot of the final results provided for the reference -