Setting Multiply Choice Values?

More
1 week 6 days ago #176088 by minerva1961
minerva1961 created the topic: Setting Multiply Choice Values?
Hi everyone.

Struggling with Expression Manager, there's a very steep learning curve at the start. I'm trying to help one of the researchers here with her project but getting nowhere fast and the online manual isn't very friendly.

She wants to look at Exercise Routines specifically BIKE, I've pasted 3 (of the nearly 40 choices) below

SQ-1: bicycling, stationary, 161-200 watts, vigorous effort
SQ-2: bicycling, stationary, 201-270 watts, very vigorous effort
SQ-3: bicycling, stationary, 51-89 watts, light-to-moderate effort

It's anticipated users will select at least a few of the fields.

How do I give each choice a numeric valve that I can sum in a textbox after the question? I'm sure this must be a FAQ somewhere but my coffee isn't doing it's job..


I've went down a lot of dead-ends yesterday (Validation/assessment) but not making any headway.

The nice simple BMI example works perfectly on my survey but I'm struggling with this.

Any pointers would be much appreciated.

And my frazzled brain thinks the {sum} should be something like this

{sum(BIKE_SQ-1,BIKE_SQ-2, BIKE_SQ-3)}

but I'm sure that's wrong as well.

TVMIA

Derek

Please Log in or Create an account to join the conversation.

More
1 week 6 days ago #176095 by tpartner
tpartner replied the topic: Setting Multiply Choice Values?
Maybe something like this:

{sum(if(BIKE_SQ1 == 'Y', 200, 0), if(BIKE_SQ2 == 'Y', 270, 0), if(BIKE_SQ3 == 'Y', 89, 0))}

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

Please Log in or Create an account to join the conversation.

More
1 week 5 days ago #176170 by minerva1961
minerva1961 replied the topic: Setting Multiply Choice Values?
THANK YOU! That's really very very helpful!
Great stuff :-)

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!