Calculating Results From a Matrix Table in Qualtrics | XM Community
Solved

Calculating Results From a Matrix Table in Qualtrics


Userlevel 1
Badge +2

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!!!

icon

Best answer by MatthewM 23 August 2021, 20:08

View original

21 replies

Userlevel 7
Badge +30

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.

Userlevel 1
Badge +2

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.

Userlevel 7
Badge +30

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

Userlevel 1
Badge +2

image.pngHere it is

Userlevel 1
Badge +2

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

Userlevel 7
Badge +30

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 }

Userlevel 1
Badge +2

This is what I get:
image.png

Userlevel 1
Badge +2

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

Userlevel 7
Badge +30

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.

Userlevel 1
Badge +2

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

Userlevel 1
Badge +2

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.

Userlevel 1
Badge +2

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

Userlevel 1
Badge +2

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

Userlevel 7
Badge +30

I just sent it in a private message.

Userlevel 1
Badge +2

Got it. Just collaborated with you on it.

Userlevel 1
Badge +2

I'm at lunch, so you are good.

Userlevel 1
Badge +2

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

Userlevel 1
Badge +2

How did you even find QID35?

Userlevel 7
Badge +30

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

Userlevel 1
Badge +2

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