Adding score/value to option codes

How do I add score/value to option codes from a multi-select and single select questions, then later sum up the scores/value…

Thanks.

Hello @wadesoga

What specifically do you want to do?

Why do you want to do it?

For Social Class Measurement (Living Standard Measurement)

Well in this case, what are the options for your questions?


That’s the option codes.
optioncode 1,2,3,4&15==2, optioncode 5,8,9&14=4, optioncode 6,10=1, optioncode 7,12,13,16==3, optioncode 11=5.

Also, I want to be able to sum all the option code selected to show on screen for interviewers.

Thanks

Do it:

Create a new variable of type Long Integer named SumOpt
In the expression field put:

new[]
{
    multi_Select.Contains(1)?2:0,
    multi_Select.Contains(2)?2:0,
    multi_Select.Contains(3)?2:0,
    multi_Select.Contains(4)?2:0,
    multi_Select.Contains(5)?4:0,
    multi_Select.Contains(6)?1:0,
    multi_Select.Contains(7)?3:0,
    multi_Select.Contains(8)?4:0,
    multi_Select.Contains(9)?4:0,
    multi_Select.Contains(10)?1:0,
    multi_Select.Contains(11)?5:0,
    multi_Select.Contains(12)?3:0, 
    multi_Select.Contains(13)?3:0,
    multi_Select.Contains(14)?4:0,
    multi_Select.Contains(15)?2:0,
    multi_Select.Contains(16)?3:0
}.Sum()

Then put %SumOpt% in the place where do you want to show the value.

. … Will try this out and let you know how it goes.

Thanks


It’s showing syntax error… Please help check the error code. I guess it’s from the expression used

Thanks

It worked… Apparently i need to change the multi-select question to checker box instead of yes and no…
Thanks

How do i do the same thing for single code type of question

(x==1)?75:0 + (x==2)?35:0 ...
Assuming scores 75, 35, … for options 1, 2, …

thanks for this…
Now what i need is, “if total score is 75, show TEXT” or alternatively “if total score is 50-69, select option code of hidden question to show”.

Thanks in advance also again.

Use a static text element with a corresponding enabling condition.

Great… Can you help out with example of how to write the enabling condition of “if Sumtotal =>70 show AB” and “if Sumtotal inRange (56,69) show C1”…
Thanks.