Welcome to the LimeSurvey Community Forum

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

Can I view equation values in a statistics report?

  • otto66
  • otto66's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #239438 by otto66
Please help us help you and fill where relevant:
Your LimeSurvey version: [5.4.5 ]
Own server or LimeSurvey hosting: own server
Survey theme/template:
==================
Hello,
I try to view the values (integers or floating points) build by an equation inside a statistics report.
But I can't get it running.
It is like 
question1 : type radio  (select a number)
question2 : type radio (select a number)
question3 : type Equation : sum(G00Q01.value, G00Q02.value)
I am able to see the calculated values inside the database,
but will never see any of them inside my reports, no matter if it is a simple or export mode.
It is alway "no answer" in the reports.

Any hint?
Thanks in advance.
Kind regards
Otto
 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #239439 by tpartner
Load a hidden numeric question with the "score".

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • otto66
  • otto66's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #239445 by otto66
Hello tpartner,
thanks a lot for your fast response.
But to be honest, I do not have any idea what you advice with "score".
I look around to get it, but for me I did not find helfull infos.

By the way, I tried also assessment values, for me it looked like its is just there to response to the user with some kind of "ranking".

I need just the calculated value displayed in the report.
Is there a switch or option I have to set to get the value displayed?

Maybe there is an example code?

Kind regartds
Otto

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #239453 by tpartner
"Score" is simply a generic term I use.

Assessment values are not recorded in the data - manual.limesurvey.org/Assessments/en#Sav...ssment_Value_in_Data

To work around it, you need to use Expression Script to load a hidden numeric question with the values - manual.limesurvey.org/ExpressionScript_-..._assignment_operator .

1) Insert a hidden numeric question (for example, with code "score").

2) Insert a hidden equation question containing something like this:
 
 
Code:
score = sum(G00Q01.value, G00Q02.value)

Sample survey attached: 

File Attachment:

File Name: limesurvey...1(2).lss
File Size:63 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: otto66

Please Log in to join the conversation.

  • otto66
  • otto66's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #239509 by otto66
Hello Tony,
perfect! :-)
Thanks a lot, for your super support.
I expected to use the value from the equation direct, now I see we push it to a hidden question to get it reported.

Kind regards
Otto

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose