Calculating Results From a Matrix Table in Qualtrics | XM Community
Skip to main content

When I try to add piped text into the new field to do the calculation, it just shows the numbers, it does not sum. Is there a way to get the sum of the numbers from the question above it?

EMERGENCY!!!

Hi Flintstone81 ,
I miss MSU! I believe there has to be a page break between the question where the numbers are entered, and the question or text object that you are piping the result of the calculation into. If both are on the same screen the piping will not work.


I have them on separated that way, but it only shows the numbers, it does not sum them. I can at least now get the numbers, before I was only getting the days. What it is, is a timesheet, where they enter their hours worked and I want to sum that total in the next question, so that they don't have to. Too bad you are not still at MSU, but hopefully you are doing better things.


If you can share screen shots of the question, and share the text of the formula you're using, I could review them.


image.pngHere it is


It's after the = in Q5 (Total hours worked for pay period.....) =


So you want to sum the values entered in the 14 fields of Q4 and pipe the result into the text of Q5? If my understanding is correct, please try the following.

  1. Make sure that Q4 is a Matrix Table - Constant Sum type question.

  2. Replace the piped text reference in Q5 with the code below. (I'm assuming that Q4 = QID3.)

$e{ q://QID3/ChoiceNumericEntryValue/1/1 + q://QID3/ChoiceNumericEntryValue/1/2 + q://QID3/ChoiceNumericEntryValue/2/1 + q://QID3/ChoiceNumericEntryValue/2/2 + q://QID3/ChoiceNumericEntryValue/3/1 + q://QID3/ChoiceNumericEntryValue/3/2 + q://QID3/ChoiceNumericEntryValue/4/1 + q://QID3/ChoiceNumericEntryValue/4/2 + q://QID3/ChoiceNumericEntryValue/5/1 + q://QID3/ChoiceNumericEntryValue/5/2 + q://QID3/ChoiceNumericEntryValue/6/1 + q://QID3/ChoiceNumericEntryValue/6/2 + q://QID3/ChoiceNumericEntryValue/7/1 + q://QID3/ChoiceNumericEntryValue/7/2 }


This is what I get:
image.png


I changed the question number to the correct question number, which is QID4


I think you're close to getting it right but something hard to find might be slightly off, causing it to fail. If you're comfortable sharing a preview link to that block of the survey, I could test and take a closer look.


Yes. Give me a minute.
https://msu.co1.qualtrics.com/jfe/form/SV_9AXxek1lynHgr1s


I think I somehow recoded the question number and it's not validating properly. I may have to add a new question and try it. Hold on.


Nope, that didn't help at all. Ughhhh, I'm so frustrated. I have tried everything, but nothing seems to work.


What's your email, I can share that survey with you and you can see it from the actual survey?


I just sent it in a private message.


Got it. Just collaborated with you on it.


I'm at lunch, so you are good.


YOU ARE AWESOME!!!!!!!! Thank you so very much.


How did you even find QID35?


Qualtrics doesn't really have good instructions on it, but you can find the QID by inspecting the element in your browser, or by piping something temporarily from the question into another question, and looking for the QID in the resulting code before deleting or not saving the piped text. Examples of each are below, but note that the second example uses a different survey from yours, so the ID numbers are different.
Inspecting element:
image.png
Inserting Piped Text:
image.png
image.png


Got it. Thanks


Hello! I have this exact problem and have copied the code below to no avail. Just curious what the resolution was in the end
https://community.qualtrics.com/XMcommunity/discussion/comment/39926#Comment_39926


Leave a Reply