- Posts: 21
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
how to sum assessment values from Array questions?
- penguin2003
- Topic Author
- Offline
- Junior Member
Less
More
2 years 2 months ago - 2 years 2 months ago #223683
by penguin2003
how to sum assessment values from Array questions? was created by penguin2003
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]5.2.9
Own server or LimeSurvey hosting:OWN
Theme:
==================
[Write here your question/remark]
My survey has 11 Array questions. For each question participants can choose 1 of 5 options.
The question codes a Q1 - Q11 and the answer codes A1 - A5 with a different assessment value for each answer code.
I want to sum all the assessment values from all of the answers in a calculation in a hidden equation, but nothing I have tried worked.
How should I do this?
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]5.2.9
Own server or LimeSurvey hosting:OWN
Theme:
==================
[Write here your question/remark]
My survey has 11 Array questions. For each question participants can choose 1 of 5 options.
The question codes a Q1 - Q11 and the answer codes A1 - A5 with a different assessment value for each answer code.
I want to sum all the assessment values from all of the answers in a calculation in a hidden equation, but nothing I have tried worked.
How should I do this?
Last edit: 2 years 2 months ago by penguin2003.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
2 years 2 months ago #223696
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic how to sum assessment values from Array questions?
You have 11 question of type "array" with several subquestions?
Or one question with 11 subquestion as in your creenshot?
Nevertheless:
To access assessment values you use the property "QCode.valueNAOK"
[url] manual.limesurvey.org/ExpressionScript_-...#Access_to_variables [/url]
To sum the values you use the function "sum()"
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
And not to have to include each question and subquestion into this function you can use the ".that" variable
[url] manual.limesurvey.org/ExpressionScript_-....22that.22_variables [/url]
This way it is only
{sum(that.Q1.valueNAOK,that.Q2.valueNAOK,,...)}
By the way: Why do you use these alphanumerical codes "A1", "A2", ... instead of numerical codes?
Now you will not be able to calculate later in your analysis any statistical value like mean, std. deviation or so, not be able to calculate statistical tests.
Joffm
Or one question with 11 subquestion as in your creenshot?
Nevertheless:
To access assessment values you use the property "QCode.valueNAOK"
[url] manual.limesurvey.org/ExpressionScript_-...#Access_to_variables [/url]
To sum the values you use the function "sum()"
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
And not to have to include each question and subquestion into this function you can use the ".that" variable
[url] manual.limesurvey.org/ExpressionScript_-....22that.22_variables [/url]
This way it is only
{sum(that.Q1.valueNAOK,that.Q2.valueNAOK,,...)}
By the way: Why do you use these alphanumerical codes "A1", "A2", ... instead of numerical codes?
Now you will not be able to calculate later in your analysis any statistical value like mean, std. deviation or so, not be able to calculate statistical tests.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- penguin2003
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 0
2 years 2 months ago #223697
by penguin2003
Replied by penguin2003 on topic how to sum assessment values from Array questions?
if The question codes a Q1 - Q11 and the answer codes 1 - 5 with a different assessment value for each answer code.
HOW TO DO?
may i have example lss files ?
HOW TO DO?
may i have example lss files ?
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
2 years 2 months ago - 2 years 2 months ago #223700
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic how to sum assessment values from Array questions?
Please, read the linked sections of the manual,
Create a small test survey where you try out.
Create a test survey, with your tries, preferable in English, that you attach as lss.
See above{sum(...)}
Create a small test survey where you try out.
Create a test survey, with your tries, preferable in English, that you attach as lss.
See above{sum(...)}
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 2 months ago by Joffm.
The topic has been locked.
- tammo
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 964
- Thank you received: 217
2 years 2 months ago #223701
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic how to sum assessment values from Array questions?
I have made an example some time ago:
www.respondage.nl/scoring_an_array/
The page also has a downloadable file that explains (hopefully...)
Tammo
www.respondage.nl/scoring_an_array/
The page also has a downloadable file that explains (hopefully...)
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.