# How to rank roster members based on a question value

Hi,

I have a problem ranking roster members. I have a roster of plots, which has a sub-roster of seasons, and then a sub-roster of subplots. I have calculated the revenues of all the crops grown on a subplot for each season specified.

But now the next section should only apply to subplots_season combinations that have the 6 highest revenues.

An example is as follows:
A. plot 1, winter , subplot 1 = 50\$
B. plot 1, winter , subplot 2 = 100\$
C. plot 1, summer , subplot 1 = 200\$
D. plot 1, summer , subplot 2 = 40\$
E. plot 1, summer , subplot 3 = 120\$
F. plot 2, winter , subplot 1 = 450\$
G. plot 2, summer , subplot 1 = 500\$

So i want the following section to only show up for A,B,C,E,F,G. I know i can set the relevance statement to be: revenue > 10000. So if i can find out the amount of revenue which is the 6th highest, then i can set the relevant statement to work.

Thank you for your help.

Hello Odbayar,

looks like you are combining the analysis with the data collection. There were no answers in the last 6 days since you’ve posted the question, which is a good signal that you want to do something that nobody has done before.

I have created a simpler example in the “Public example User questions and common patterns” questionnaire. See if you can take it further to get the desired behavior (or simplify the desired behavior).

Is this something you’ve done earlier, perhaps in a different software package or in a different survey?

Best, Sergiy

Hello Odbayar,

I can’t understand from your last message whether you’ve found a solution or not. And whether you are replicating something that you’ve seen or done elsewhere.

Best, Sergiy

Hi Sergiy,

I was able to create a variable that has the value of the 6th entry. By using SortByDescending, then skip(5) FirstOrDefault

And if that value was null, then a variable that counted how many subplots i had in total.