Welcome to the LimeSurvey Community Forum

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

Assigning points to Questions and corresponding scores to assigned Groups

  • KhemrajC
  • KhemrajC's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 11 months ago #196405 by KhemrajC
Hi All,


This query is about assigning points to questions and corresponding scores to assigned groups.

Please bear in mind that I do not have access to global settings since I am receiving hosting facility.


Say, I have the following two questions in a group called Fitness.

I wish to have a score for the group based on the rating system (point) for each question.

And the points and score has to be saved.


Do you practise yoga?

Yes (1 point), No (0 point)


What type of sports you practised?

Light walking (1 point)
Running (2 points)
Gym (3 points)


At the end, I wish a certain recommendation to be displayed to the respondent which is dependent
on the score for that group.


How to proceed?


Thank you very much.


Best regards

KhemrajC
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #196406 by Joffm
Use Expression Manager.
In a question of type equation you may sum up your points.

Read the manual about it.
manual.limesurvey.org/Expression_Manager


In your given example there are three options to calculate:
You did not mention how you are going to code your answer options

1. here shown with the silliest way (the defaults "A1", "A2",...
{sum(if(Q1=="A1",1,0),if(Q2=="A1",1,if(Q2=="A2",2,3))}

2. with numeric options (code = given point
{sum(Q1.NAOK,Q2.NAOK)}

3. with assessment values (sometimes useful if two answer options get the same value, or negative values)
{sum(Q1.valueNAOK,Q2.valueNAOK)}

At the end you display your recommendation either by micro-tayloring, or by different text display questions selected by relevance.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • KhemrajC
  • KhemrajC's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 11 months ago #196410 by KhemrajC
Hi,

Thanks for your prompt suggestion.

Since I have already set my questions, I cannot opt for question of equation type.

The group score is meant to be calculated from straight sum of the two questions answers (unique answer for each), however I may decide to add a weighing factor afterwards. I may also have question with multiple answers at a later stage.

As per your suggestions, may I have a working example ?

Thank you very much.

Best regards
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #196415 by Joffm

Since I have already set my questions, I cannot opt for question of equation type.

I assume your survey is not active and running.
So of course you can add a question of type equation.

may I have a working example ?

No, you have to send us your sample survey with the relevant questions as lss export.

Then we know how your design looks like and tell you how to proceed.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • KhemrajC
  • KhemrajC's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 11 months ago #196425 by KhemrajC
Hi,


I just attached an exported group of questions with their attributed points.

Let us assume that the first question weighs twice more than the other two questions which are of equal weighs.

It would be easier to understand through a working example.


Thanks and regards
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #196430 by Joffm
Hi,
1. please always attach a lss export.
lsq and lsg exports are language sensitive. So we have to guess which base language you used, then create a survey with that base language, and then we are able to import it.
Furthermore lsq and lsg exports don't contain survey settigs which sometimes also are of importance.

2.

Let us assume that the first question weighs twice more than the other two questions which are of equal weighs.

Is that done by your giving 2 points to "Yes"? Or what?
Please explain.

But it is exactly what I showed in my first example.
{sum(if(Q1=="A1",1,0),if(Q2=="A1",1,if(Q2=="A2",2,3))}

In your example.
{sum(if(Q2=="Y",2,0),if(Q2b_SQ001=="Y",5,0),if(Q2b_SQ002=="Y",2,0),if(Q2c=="A1",0,1))}
If you used no Y/N question, but list(radio) you could have used assessment values.
That would have shortened the equation to
{sum(Q2.valueNAOK,if(Q2b_SQ001=="Y",5,0),if(Q2b_SQ002=="Y",2,0),Q2c.valueNAOK)}

So add a question of type equation and enter your summing up.

I saw that there are the sample survey available. You really should study them.
manual.limesurvey.org/Expression_Manager_sample_surveys


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #196510 by holch
I think what wasn't clear at the beginning: You do not have to change your questions that you have, you need to add a equation type question to do the calculations of the points. So you can keep your questions, you just need to add some things.

You can also use a mix of assessment value (you would have to activate the assessment option) and write your point as assessment mode and then can read this value into your calculations.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • KhemrajC
  • KhemrajC's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 11 months ago - 3 years 11 months ago #196777 by KhemrajC
Hi Joffm and Holch,

Thanks a lot for being so helpful.

Your advice and tips were great.

Best regards
Last edit: 3 years 11 months ago by KhemrajC.
The topic has been locked.
  • KhemrajC
  • KhemrajC's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 11 months ago #197896 by KhemrajC
Hi,


I followed all instructions for assigning scores.

I have a single option question where i assigned values by enabling assessment.

The next dependent question, is a multiple choice questions and the last option is an exclusive one ,"None of the Above" (Q4b_SQ006) whose assigned value is zero.

While trying to add all score values from the two questions with straight sum in a following equation question, it just invalidates to null (empty value) after the None of the Above" is checked.

I tried overcoming it with an additional if statement specific to that last option as such:


{if(Q4b_SQ006!="Y",sum(Q4a.valueNAOK,if(Q4b_SQ001=="Y",2,0),if(Q4b_SQ002=="Y",1,0),if(Q4b_SQ003=="Y",1,0),if(Q4b_SQ004=="Y",2,0),if(Q4b_SQ005=="Y",4,0)),0)}


It is persisting.

Please spot out my mistake.

LSS is attached.


Thank you very much.

Best regards

File Attachment:

File Name: limesurvey...9935.lss
File Size:24 KB
The topic has been locked.
  • KhemrajC
  • KhemrajC's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 11 months ago #197930 by KhemrajC
Hi,

Any hint about my mistake for this one?

www.limesurvey.org/forum/can-i-do-this-w...signed-groups#197896

Thank you very much.

Best regards
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197934 by Joffm
Hi,
there is no need to push.
We all are volunteers and answer in our spare time.
And don't forget, it's weekend.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • KhemrajC
  • KhemrajC's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 11 months ago - 3 years 11 months ago #197936 by KhemrajC
Hi,

You are all sharing knowledge with great dedication, such an active forum.

Should not have had this forum, I would have been less motivated for this community work which am doing on my own initiative during the confinement period.

Just learning new skills and implementing for the benefits of the society and you guys are just instrumental.

I have only 3 days left to complete my questionnaire which is about C19 mapping.

Yes, you are right - weekend is relax mode.

Thanks and regards
Last edit: 3 years 11 months ago by KhemrajC.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose