Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

show survey result depending on the scores on the subscales

  • promente
  • promente's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #157468 by promente
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #157472 by DenisChenu
Something like this :
Code:
{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 , plugin development .
I don't answer to private message.
The following user(s) said Thank You: promente
The topic has been locked.
  • promente
  • promente's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #157480 by promente
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!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose