How to get top 3 integer values in ODK

1. What is the issue? Please be detailed.
Hi I have a question regarding this, if you can help..
I have 20 integer questions i.e. Brand-1, Brand-2, Brand-3 … Brand-20 and I am capturing the ratings from user for these brands now I want to ask the reason of top three rated brands can you please tell me how to achieve this because max function only get higher value not 2nd higher value and third higher value and i also want to show the name of these brand so user know the brand for which he is answering

please note relevance is applied to the brands so user can rate 3 brands or more than 3 brands and ratting can be duplicate, so if user rate 10 for 3 brands then these
3 brands will be shown in next question

immediate solution will be really appreciated...

Book3.xlsx (9.4 KB)

May be this is close to what you are looking for.

You could have brand name and score in repeat group. then use select_one to manually answer the top 3 brands.

Not sure whether calculating the 2nd and 3rd rank can be done easily.

How would you rank, if in total you have more than 3 rated with same values, please?

the idea is, populate the list in dropdown and user will select the brand according to their choice.