# assessment in muliple choice

3 years 9 months ago - 3 years 9 months ago #132488 by mana
hi forum
how can i design a multiple choice with assessment ?
 state assessment state 1 9 state 2 4 state 3 0 state 4 -3

second question :
in this question according the count assessment is set
 state count ? state 1 state 2 state 3 state 4

can i use sum(question1_1*assessment , question1_2*assessment, etc) for every choice .
is it true ?

Thanks a lot for any suggestions.
Last edit: 3 years 9 months ago by mana.

LimeSurvey Partners
3 years 9 months ago #132491 by tpartner
I'm sorry, I don't understand what the objective is. What is the second question and what are you trying to do with it?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The following user(s) said Thank You: mana

3 years 9 months ago #132494 by mana
Replied by mana on topic assessment in muliple choice
is it possible to allocate assessment value to multiple choice question because i want to sum the answers of multiple question .

3 years 9 months ago #132498 by tpartner
There are no built in assessments for multiple choice questions. You will need to use Expression Manager to calculate that sum.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The following user(s) said Thank You: mana

3 years 9 months ago #132501 by mana
Replied by mana on topic assessment in muliple choice
ok
can you help me about EM ?
im newbie ....

3 years 9 months ago - 3 years 9 months ago #132511 by tpartner
Assuming (from your example) Q1 is a multiple-choice and you want you assign the following values:
• SQ001 = 9
• SQ002 = 4
• SQ003 = 0
• SQ004 = -3

Add an equation type question with the following expression to count a total for Q1:
`{sum(count(Q1_SQ001) * 9, count(Q1_SQ002) * 4, count(Q1_SQ003) * 0, count(Q1_SQ004) * - 3)}`

Sample survey attached:

#### File Attachment:

File Name: limesurvey...3432.lss
File Size:15 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
##### Attachments:
Last edit: 3 years 9 months ago by tpartner.

3 years 9 months ago #132693 by mana
Replied by mana on topic assessment in muliple choice
wow
it's work
thanks for learn and LSS

3 years 9 months ago - 3 years 9 months ago #132694 by mana
Replied by mana on topic assessment in muliple choice
one of my question is array (single choice per row )
how can i sum all rows :
sum((S5_1=="1") * 3 or (S5_1=="2") * 5 or (S5_1=="3") * 6 or (S5_1=="4") * 6 or (S5_1=="5") * 6))
its work just for 1 rows

i tried " +" , and , comma"," but dont work

the number is assessment (black color)
##### Attachments:
Last edit: 3 years 9 months ago by mana.

3 years 9 months ago - 3 years 9 months ago #132705 by tpartner
You can use nested sum() functions. Something like this (line-breaks inserted for clarity):

```{sum(
sum((S5_1=="1") * 3, (S5_1=="2") * 5, (S5_1=="3") * 6, (S5_1=="4") * 6, (S5_1=="5") * 6),
sum((S5_2=="1") * 1, (S5_2=="2") * 2, (S5_2=="3") * 3, (S5_2=="4") * 4, (S5_2=="5") * 5),
sum((S5_3=="1") * 0, (S5_3=="2") * 3, (S5_3=="3") * 4, (S5_3=="4") * 5, (S5_3=="5") * 5),
sum((S5_4=="1") * 2, (S5_4=="2") * 4, (S5_4=="3") * 4, (S5_4=="4") * 8, (S5_4=="5") * 10)
)}```

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 3 years 9 months ago by tpartner.
The following user(s) said Thank You: mana

3 years 9 months ago #132706 by mana
Replied by mana on topic assessment in muliple choice
i used this , and its work
``` ((S55_1 == "0") * 0 or (S55_1 == "1") * 3 or (S55_1 == "2") * 5 or (S55_1 == "3") * 6) +
((S55_2 == "0") * 0 or (S55_2 == "1") * 0 or (S55_2 == "2") * 2 or (S55_2 == "3") * 3)  +
((S55_3 == "0") * 0 or (S55_3 == "1") * 1 or (S55_3 == "2") * 4 or (S55_3 == "3") * 5 )```
is it true ?

3 years 9 months ago #132713
It's OK too.

But sometimes is better nto use sum.

In javacript : + can be "add" or "concat".

For example
"1"+"1" == "11"
1+1 == 2

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 .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: tpartner, mana

3 years 8 months ago #133074 by mana
Replied by mana on topic assessment in muliple choice
I write a Equation like tony , but in export show me NAN
what meaning this word
plz see my LSA and help me
my problem in SUM (name of question )

3 years 8 months ago #133097 by tpartner
NAN means "not a number". I see no LSA file.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

3 years 8 months ago #133936 by mana
Replied by mana on topic assessment in muliple choice
plz see my LSA file
##### Attachments:

3 years 8 months ago #133938 by mana
Replied by mana on topic assessment in muliple choice
I search for my question , Not A Number .its appear when i write NAOK
but i use count()
` `