How to Perform Math Operations Directly in Embedded Data? | XM Community
Skip to main content
Question

How to Perform Math Operations Directly in Embedded Data?

  • January 30, 2025
  • 4 replies
  • 72 views

gPandey_715
Level 2 ●●
Forum|alt.badge.img+5

Hi all,

I'm working on a survey where I need to calculate the sum of three numeric values entered in a matrix question and store the result in an embedded data field. Here's the scenario:

  • The matrix question ID is QID16, and I want to sum the numeric entry values from:
    • Row 12, Column 1: ${q://QID16/ChoiceNumericEntryValue/12/1}
    • Row 17, Column 1: ${q://QID16/ChoiceNumericEntryValue/17/1}
    • Row 18, Column 1: ${q://QID16/ChoiceNumericEntryValue/18/1}

I've added an embedded data field named Q11_Total in the Survey Flow, where I'm using the following formula:

Q11_Total = ${q://QID16/ChoiceNumericEntryValue/12/1} + ${q://QID16/ChoiceNumericEntryValue/17/1} + ${q://QID16/ChoiceNumericEntryValue/18/1}

However, the result always shows 0 in the embedded data field, even when valid values are entered in the matrix question.

Could anyone help me identify what I might be doing wrong? Is there a specific format I need to follow, or do I need to enable something else for this to work?

Thanks in advance for your guidance!

4 replies

  • Level 4 ●●●●
  • 209 replies
  • January 30, 2025

Ensure the QID you are mentioning is in number not in text. If possible please show the QID16 is displaying.

 

Also Syntax is incorrect. Check the syntax, ensure you make necessary changes

 

https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/math-operations/


gPandey_715
Level 2 ●●
Forum|alt.badge.img+5
  • Author
  • Level 2 ●●
  • 28 replies
  • January 30, 2025

Thank you for your help! I am now able to successfully calculate and store the sum of all three choices in the embedded data field Q11_Total.

Now, I want to pipe this embedded data value into a question, so that the question dynamically displays the total sum from Q11_Total.

Could someone guide me on the correct syntax to achieve this? Is it possible to directly reference the embedded data within a question, and if so, what is the proper format?

Appreciate any insights!


  • Level 4 ●●●●
  • 209 replies
  • January 30, 2025

vgayraud
QPN Level 5 ●●●●●
Forum|alt.badge.img+48
  • QPN Level 5 ●●●●●
  • 373 replies
  • January 30, 2025
${e://Field/Q11_Total}

 


Leave a Reply