- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Multiple numerical input: Slider - no movement = "NAN"?
- ALehner
- Topic Author
- Offline
- New Member
Less
More
6 years 9 months ago - 6 years 9 months ago #155302
by ALehner
Multiple numerical input: Slider - no movement = "NAN"? was created by ALehner
Hi there,
I have a question regarding the slider function for the question type "Multiple numerical input":
In our survey we want to use the slider with min value: 1 and max value: 9;
--> We use the stated numbers for the next question as we calculate a mean and show it to the participant in table.
The problem is that if the participant does not move the slider at least once, we cannot do calculations because no number was stated and we get "NAN" in the table.
There is the possibility to set a "Slider initial value" but still, if the participant does not move the slider no number will be recognized and "NAN" will be stated. The setting of an initial value has an influence on the site where the slider is shown but does not influence a possible value that can be used later for calculations.
Is there a possibility within Limesurvey to do a workaround or is there a function that could solve that problem?
(Using the Online Version)
If the description of the problem was to vague plz do not hesitate to call back.
Thanks in advance!
I have a question regarding the slider function for the question type "Multiple numerical input":
In our survey we want to use the slider with min value: 1 and max value: 9;
--> We use the stated numbers for the next question as we calculate a mean and show it to the participant in table.
The problem is that if the participant does not move the slider at least once, we cannot do calculations because no number was stated and we get "NAN" in the table.
There is the possibility to set a "Slider initial value" but still, if the participant does not move the slider no number will be recognized and "NAN" will be stated. The setting of an initial value has an influence on the site where the slider is shown but does not influence a possible value that can be used later for calculations.
Is there a possibility within Limesurvey to do a workaround or is there a function that could solve that problem?
(Using the Online Version)
If the description of the problem was to vague plz do not hesitate to call back.
Thanks in advance!
Last edit: 6 years 9 months ago by ALehner.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10613
- Thank you received: 3691
6 years 9 months ago #155305
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Multiple numerical input: Slider - no movement = "NAN"?
Can you provide the code that you are using to calculate the mean?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- ALehner
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
6 years 9 months ago #155322
by ALehner
Replied by ALehner on topic Multiple numerical input: Slider - no movement = "NAN"?
Sure (normalization):
{round(1/sum(1, 1/Q02_SQ001, 1/Q02_SQ002, 1/Q02_SQ003)*100,2)} %
Thanks in advance!
{round(1/sum(1, 1/Q02_SQ001, 1/Q02_SQ002, 1/Q02_SQ003)*100,2)} %
Thanks in advance!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10613
- Thank you received: 3691
6 years 9 months ago #155334
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Multiple numerical input: Slider - no movement = "NAN"?
This is a bug. If you set a "Slider initial value", that value should act the same as a default value, so should be recorded in the data and seen by Expression Manager.
bugs.limesurvey.org/view.php?id=12445
In your case, since no initial value is seen, the expression is trying to calculate a sum where three values are infinite so fails to NAN.
As a workaround, try setting "Default answers" as well as "Slider initial value".
bugs.limesurvey.org/view.php?id=12445
In your case, since no initial value is seen, the expression is trying to calculate a sum where three values are infinite so fails to NAN.
As a workaround, try setting "Default answers" as well as "Slider initial value".
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: ALehner
The topic has been locked.
- ALehner
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
6 years 9 months ago #155337
by ALehner
Replied by ALehner on topic Multiple numerical input: Slider - no movement = "NAN"?
Great! That works!
Thank you!
Thank you!
The topic has been locked.