# Selecting highest value

So I am creating a survey that looks at training needs within an organization so it is set up so it will show a certain professional area then you rank it based on difficulty 1-5 and importance 1-5. I am wondering if it is possible to put a calculation question for each are to add the two values up then at the end of the survey for the survey to look at all the calculations and list say the top three areas they indicated they need training in for their own self-reference. I know You can select the highest number in excel but can you do this in ODK?

Hi @Anderson
I can assess that you have established the first component which is a direct summation i.e. \${Q1}+\${Q2} . Let us say this gives you Q3 for each professional area i.e. Q3a Q3b Q3c for a b c professional areas.

• You can then use max function to get which one is maximum i.e. max( \${Q3a},\${Q3b},\${Q3c})
• You can then use a varied option to get the final best
IF(\${Qmax}=\${Q3a},\${Q3a},(IF(\${Qmax}=\${Q3b},\${Q3b},\${Q3c})))

Hope this helps

Regards

1 Like

Hello,

Thank you for this helpful reply. I am wondering if it is possible to do something in the way of a note such as IF(\${Qmax}=\${Q3a},Display a certian text,display another text)

The aim would be to display a text saying â€śprofessional area b (as determined by a calculation) was your lowest scoreâ€ť

Does that make sense?
I might be fundamentally misunderstanding what a calculation can do.

Hi
You could add the calculate question first (eg Q23) and then reference that calculate question within your note e.g. Your results is \${Q23}

Stephane

1 Like

Hi there, I havenâ€™t been able to succeed in getting this to work. Do you mind taking a look at it and advising me where I have gone astray. ansXAws7VNXBj3zFffi7AC.xls (21.5 KB)

Hi @Anderson
I just checked your form and it is scripted well. What exactly is the error you see. Show some screenshots. Also note that a calculate command when it has some missing values may not calculate. Just ensure that this is complete. Send me a link to the form I test out the entry.

Stephane

1 Like