The goal of this challenge was to determine the top 5 based on the count. However, some rows have the same count so the ranking would be the same for these rows.
Here is how the input data looked:
Firstly, I used the Sort tool to sort “count” in descending order, as the larger the count the higher the rank. Then I added the Multi-Row Formula tool to assign the ranks for each row using this IF statement:
if [count] != [Row-1:count]
then [Row-1:Rank] + 1
else [ROW-1:Rank]
endif
This IF statement states that if count is not equal to the previous row, then add 1 to Rank. However, if count is equal to the previous row, then the Rank will also be the same as the previous row.
Here is a snippet of the final result: