Embedded data - Math Operations - to add an Embedded value with a formula but it is not working | XM Community
Skip to main content


Hi All,
When I try to add the below Math operation in embedded data, it is not populating any values. But just adding this in a question as piped text, the values are populating.
$e{ ( ( q://QID270%231/ChoiceGroup/SelectedAnswers/1 ) + ( 10 - q://QID265/ChoiceNumericEntryValue/1 ) ) / 2 }
Question 1 is a dropdown with 0-10 values
Question 2 is a rating scale with 0-10 values
Embedded data Math Operation.JPGI tried these two methods.
I am selecting non-zero values for testing.
Embedded data was added to the top of the survey flow.




PeeyushBansal MatthewM Could you please have a look?


Try it without the unnecessary parens:
$e{ ( q://QID270%231/ChoiceGroup/SelectedAnswers/1 + ( 10 - q://QID265/ChoiceNumericEntryValue/1 ) ) / 2 }
Also, check your piped fields by piping them into a text/graphic question.


TomG Hi Tom. I tried using the above but the result is the same.
The output is showing as 5, i.e the piped-in values for the first and second parts of questions are blank (0+(10-0)/2 ).
If the formula is piped in a text/graphic question, it is working fine.
But I want the result in an embedded field so that I can use that embedded field as a display logic for closing certain participants who have low scores.


I figured it out.
It was because of the position of the embedded field.
I created the embedded field at the top of the survey block, but I have to create it after the required questions. Only then it will consider the responses recorded.
Attaching another sample I did to test the feature.

Hope this helps anyone who was confused like me! 🙂
Math operation and Embedded field.JPG


Leave a Reply