show survey result depending on the scores on the subscales

More
4 months 1 week ago #157468 by promente
promente created the topic: show survey result depending on the scores on the subscales
Hello!

I have a survey with 100 five-point array questions divided in 10 block (scales). I used the "sum" function to calculate and display the sum of values for each of these 10 blocks of questions, so, at the end of the survey, there are 10 blocks (variables) with sum of values. The blocks are labeled as A, B, C, D, E,...
However, I do not want that respondent see a list of values for each of the ten block, but only the highest one. For example, if respondent have following scores on A=5,6, B=9,2, C=2,03, D=6,6, I want to show only the B instead of showing all of the values. I tried to do it with "max" function, but it shows only the value, not the label as well.

It looks like this:
"Your highest values is 9,2"

but, I'd like to display it as:
"Your highest value in on B=9,2"


So, is there any way to show only the maximum value and corresponding label.

Thank you for any suggestion.

Please Log in to join the conversation.

More
4 months 6 days ago #157472 by DenisChenu
DenisChenu replied the topic: show survey result depending on the scores on the subscales
Something like this :
{if(score_A==max(that.score),"A","")
if(score_B==max(that.score),"B","")
if(score_C==max(that.score),"C","")
if(score_D==max(that.score),"D","")}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: promente

Please Log in to join the conversation.

More
4 months 6 days ago #157480 by promente
promente replied the topic: show survey result depending on the scores on the subscales
Thank you very much!It works.
However, now I have another challenge. I'm try to display two or three the best or highest scales. For example, I want to respondent get a message like "Your highest score is on a scale B, and the on a scale D.

Is this possible to do in lime?
Thank you!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!