Problem with RANKX with certain condition

@Toni This: