# Setting Multiply Choice Values?

11 months 2 weeks ago #176088
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

LimeSurvey Partners
11 months 2 weeks ago #176095 by tpartner
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.
Official LimeSurvey Partner - partnersurveys.com

11 months 2 weeks ago #176170
THANK YOU! That's really very very helpful!
Great stuff