Can you perform math operations on loop & merge values? | XM Community
Skip to main content

Hello,
I am a creating a risky financial decision task where participants choose between a guaranteed outcome or a 50/50 outcome with both gain and loss possibilities. Example:
Option 1: Gain $8
Option 2: Gain $9 or lose $7
-------------------------------------------------------------------------------------------------------------
In that example, there is a base (8) and a multiplier (1/8) that is either positive or negative.
The way I have the blocks set up is that the base value comes from loop & merge. Is there a way to perform math operations on that base value in order to get the option 2 values?
This is what I have now, and it's not working:
Gain e{ Number("${lm://Field/1}") * 1/8} or lose e{ Number("${lm://Field/1}") * - 1/8}
-------------------------------------------------------------------------------------------------------------
I think the basic issue here is the conversion of loop & merge values into mathematically operational values (i.e., numbers).

I haven't tried it, but I think so. However, your formatting is incorrect. They should be:
Gain:
$e{ lm://Field/1 / 8 }
Lose:
$e{ lm://Field/1 / 8 * -1 }


https://community.qualtrics.com/XMcommunity/discussion/comment/42918#Comment_42918Tom, you have been so helpful, thanks!


Leave a Reply