Welcome to the LimeSurvey Community Forum

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

assesment each group sum

  • swatib
  • swatib's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #227783 by swatib
assesment each group sum was created by swatib
How can I calculate sum of each question group  separately  in form of table.
Currently it showing same total for both question group.
I use formula like-   {sum(t1.value,t2.value)}

for both table row.
See atached screenshot.
LS version- 5.2.12
Theme - fruity   
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227785 by Joffm
Replied by Joffm on topic assesment each group sum
Hi,
nobody knows what you are doing.
According to your screenshot you add the assigned assessment values of two (single) questions (t1 and t2) 

As long as you do not explain further or provide a lss export we can't help.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • swatib
  • swatib's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #227787 by swatib
Replied by swatib on topic assesment each group sum
Please see atached lss file.
 

File Attachment:

File Name: limesurvey...9563.lss
File Size:36 KB

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago - 3 years 1 month ago #227793 by Joffm
Replied by Joffm on topic assesment each group sum
Hi,
I do not see what you showed in your screenshot.

And your assessment is working, or?
 
Though I do not see the meaning of the min and max values.
And in assessments you should use either {PERC} or {TOTAL} to asscess the assessment score of a group or  the entire survey.
[url] www.limesurvey.org/manual/Assessments/en [/url]

But generally, we do not use assessment anymore.
ExpressionScript is much more flexible and mightier.
Of course you still may use the property ".value" to access the assigned values.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 1 month ago by Joffm.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227797 by Joffm
Replied by Joffm on topic assesment each group sum
Here your example back with ExpressionScript.

In a real survey you should calculate the scores before in an equation and use trhis in the end message.
 

File Attachment:

File Name: limesurvey... (1).lss
File Size:33 KB

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • swatib
  • swatib's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #227819 by swatib
Replied by swatib on topic assesment each group sum
You got my point Joffm.
Thank you so much for your help.
Its working fine now.

Please Log in to join the conversation.

  • swatib
  • swatib's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #227829 by swatib
Replied by swatib on topic assesment each group sum
can you please help me , How can I sum of multiple choice questions.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227833 by Joffm
Replied by Joffm on topic assesment each group sum
What do you want to sum?
What is a "multiple choice question"? 
Do you talk about "single punch questions" or "multi punch questions"?
Please, do not throw only one phrase. Explain clearly, what you want to do, show screenshots, provide lss exports!

And you sum with the function "sum(Arg1, Arg2,...)" as described in the manual.
Read about "implemented functions" and "access to variables" in the ExpressionScript section of the manual.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • swatib
  • swatib's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #227872 by swatib
Replied by swatib on topic assesment each group sum
 

How can i do sum for this question. This is my 2nd quest after 1st radio type question.
For radio I used  {sum(qcode.value)}    

How will I add next sum for checkbox question.
Ls version- 5.2.12
theme-fruity

Please Log in to join the conversation.

  • swatib
  • swatib's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #227874 by swatib
Replied by swatib on topic assesment each group sum
 

File Attachment:

File Name: limesurvey...1778.lss
File Size:178 KB


Their is .lss file attached ,please see and suggest idea.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227876 by Joffm
Replied by Joffm on topic assesment each group sum
How do you want to "sum" this "multiple" question?
Generally: In "multiple" questions you have to take in account the subquestions.

Do you want to know how may subquestions were selected? 
Function count().

Do you want to calculate something depending on the combination of selections?
This was answered in your other thread about this.

Do you want to calculate a score based on all subquestions but with different weighting?
As you see in the "logic" part of your question there is only one assessment value in "multiple" questions; so you have to do this by yourself.
Let's assume you weight:
Subquestion SQ001 with 2
Subquestion SQ002 with 3
Subquestion SQ003 with 0.5
Subquestion SQ004 with 3
...
Either the "usual way"
{sum(if(Q1_SQ001=="Y",2,0),if(Q1_SQ002=="Y",3,0),if(Q1_SQ003=="Y",0.5,0),if(Q1_SQ004=="Y",3,0),...)}

or
with function "countif" (advantage; you can shorten, if there are identical values
{sum(2*countif("Y",Q1_SQ001),3*countif("Y",Q1_SQ002,Q1_SQ004),0.5*countif("Y",Q1_SQ003),...)}

or
knowing that the value of TRUE is "1" (therefore you often see in conditions the default value "1")
{sum(intval(Q1_SQ001 == "Y") * 2,intval(Q1_SQ002 == "Y") * 3,,intval(Q1_SQ003 == "Y") * 0.5,intval(Q1_SQ004 == "Y") * 3,...)}

If you use an suitable coding of the subquestions you may shorten using the "that" variable".

You do not see the property ".value". As said at the beginning, in "multiple" questions there are no individual assessment values.

So explain, what and how you want to "sum" this question.

By the way: In all aggregation functions you should use ".NAOK"

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • swatib
  • swatib's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 month ago #227878 by swatib
Replied by swatib on topic assesment each group sum
I want syntax how can I merge sum function for radio and checkbox question in end message.
Here question 1,2 and 5 are radio questions and 3 and 4 are checkbox questions. 

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose