Calculate a summ out of an array question

More
4 years 11 months ago - 4 years 11 months ago #88175 by Einstein
Einstein created the topic: Calculate a summ out of an array question
Hello,

We are trying to put up an project selection for 40 participants. For each prjoject there are 5 criteria like quality, impact and so on. all of these criteria can be rated eather from 1 to 3 or 1 to 5 or... 1 o 8. I use the Q-type array (multiflexi 1-10). What i need in the end is a summ of all the points given for example by personX for project 4. And in the end I need a summ for all points given by all participants for project 4.

I dont know how to use the Expression Manager for this purpose. I´ve been reading a lot about the Qcode.value but I can't find the right way to use it. I don´t need the summ to show up within the survey i only need the result in the end as a result in an excel sheet.

One question is how to define the values for the different answeroptions from 1 to 7 as I am using the Q-type array (multiflexi 1-10) As I´m German I am not absolultely familiar with the english wording in lime. I turned on somethin thats called BEWERTUNGSMODUS in german. The english translation should be ASSESMENTMODE or EVALUATIONMODE. Here it seems like i can assign values to the different answerotions.

Am I on the right track?

Moreover I would like to know where and how to put the Qcode.value so that it calculates the way I described in the upper part of the text. Detailed description would be good as i am a bloody beginner BUT I´m thankfull for every hint.

LimeSurvey Version 1.92+ Build 120919


Thanks
Einstein






Attachments:
Last Edit: 4 years 11 months ago by Einstein.

Please Log in to join the conversation.

More
4 years 11 months ago #88195 by tomscher
tomscher replied the topic: Calculate a summ out of an array question
Please clarify: you want to sum up values of items although they use different scales (1-3, 1-5)? You also write something about "1 to 7", however I do not see any 7 answer options in your screenshot?

Solution for your first sum:
It would not be as simple as {question1.value + question2.value} and using a equation question type (=formula)? If you do not want to show this equation, then you may hide this question.

Solution for your second sum (overall points given for project 4):
This is less simple if you want to code it in Limesurvey. I think you may be able to do this using some php and javascript, but I think it's not worth it.

Why don't you just use Excel or R or SPSS to compute that sum? Any reason why you want this in Limesurvey? In Excel it's just a simple sum / calculation....

Please look at the attached survey for more info of the first solution.
Attachments:

Please Log in to join the conversation.

More
4 years 11 months ago #88210 by Ben_V
Ben_V replied the topic: Calculate a summ out of an array question
Another sample survey and useful link

File Attachment:

File Name: assess_EM.lss
File Size:29 KB


Ben/

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Attachments:

Please Log in to join the conversation.

More
4 years 11 months ago #88262 by Einstein
Einstein replied the topic: Aw: Re: Calculate a summ out of an array question
Thank you so much. It works!!!

Only thing I haven´t found out yet is how to save this count in the results. It doesn´t show up on in my result excel-sheet in the end. Any recommendations?

best regards
Einstein

Please Log in to join the conversation.

More
4 years 11 months ago #88285 by Ben_V
Ben_V replied the topic: Aw: Re: Calculate a summ out of an array question
As shown in my previous sample survey you have to create an "equation" type question at the end of your survey to store this result.. Use the textarea of your question just to set your equation
Example of basic syntaxis:
{sum(q1.value,q2.value,q3.value,q4.value)}

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: TMSWhite

Please Log in to join the conversation.

More
4 years 11 months ago #88607 by Einstein
Einstein replied the topic: Aw: Re: Calculate a summ out of an array question
Yep now it works!

Thank you!

Please Log in to join the conversation.

More
4 years 11 months ago - 4 years 11 months ago #88663 by DenisChenu
DenisChenu replied the topic: Aw: Re: Calculate a summ out of an array question
I test too with
{assessment_CURRENT_TOTAL}
: seems to work for 1.92. Have to test on 2.0
asse*sment in capital ... Auto help link is great , but not all the times ;)

Denis

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 .
Last Edit: 4 years 11 months ago by DenisChenu. Reason: Auto help link is great

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now