Maths Operation in Embedded Data | XM Community
Solved

Maths Operation in Embedded Data


Dear Qualtrics Community,

I am trying to figure something out:

As you can see in my screenshot, I defined that "SumTT1TT2" is the sum of TT1 and TT2.

However, when I want to display SumTT1TT2 via Piped text, the result is always 0, no matter what values are behind TT1 and/or TT2.

Does anybody know why this happens?

Thanks in advance!

!
icon

Best answer by TomG 1 August 2018, 14:10

View original

11 replies

Userlevel 7
Badge +33
Hi, Just checking if you have added space after {
Userlevel 7
Badge +6
Are you making sure that the this embedded data block (Eingebettete Daten) exists _before_ the block where you are trying to display SumTT1TT2?
Thanks for your replies!

@bansalpeeyush29 yes, there is a space after }
@Akdashboard yes, the block exists before the block where I want to display SumTT1TT2
Userlevel 7
Badge +27
I think somehow you aren't setting TT1 and TT2. Consider this survey:
!

TT1 and TT2 set: https://marketinview.ca1.qualtrics.com/jfe/preview/SV_3WcSq9kDZT91zbn?Q_SurveyVersionID=current&Q_CHL=preview&TT1=3&TT2=4

TT1 and TT2 NOT set: https://marketinview.ca1.qualtrics.com/jfe/preview/SV_3WcSq9kDZT91zbn?Q_SurveyVersionID=current&Q_CHL=preview
Badge +2
Hi, Wanted to check if you are testing this using Preview or through a survey invite. This does not work when testing through Preview as there would be no data in embedded fields.
Userlevel 6
Badge +6
> @Skulkarni2611 said:
> Hi, Wanted to check if you are testing this using Preview or through a survey invite. This does not work when testing through Preview as there would be no data in embedded fields.

You can fake data in a preview by adding it in the URL via query strings.

For example, you could do:

https://marketinview.ca1.qualtrics.com/jfe/preview/SV_3WcSq9kDZT91zbn?Q_SurveyVersionID=current&Q_CHL=preview&TT1=10&TT2=20
Badge +2
@mattyb513 - Completely agree with you. Its matter of passing the data in the URL via query strings OR passing it through the contact list. I passed it through the contact list and when tested using a preview, this did not work, whereas when testing through a survey invite, it worked.
Userlevel 7
Badge +27
> @Skulkarni2611 said:
> @mattyb513 - Completely agree with you. Its matter of passing the data in the URL via query strings OR passing it through the contact list. I passed it through the contact list and when tested using a preview, this did not work, whereas when testing through a survey invite, it worked.

To populate fields from a contact list in preview mode you would need to use an authenticator.
Userlevel 7
Badge +38
I think @TomG is most on point. Are you defining TT1 and TT2 in the panel or is it supposed to be defined from their survey responses? If they both exist in the panel information, then I don't understand why you wouldn't load the sample with TT1 and TT2 already summed rather than making Qualtrics calculate it.

However if TT1 and TT2 are responses to a survey question, you need to define that in the Survey Flow of your embedded data using wert jetzt einstellen.
Thanks for all the answers!
Will try out your suggestions as soon as I can.

@bstrahin TT1 and TT2 are responses to survey questions. More specifically, they are the word counts of different text entry fields. As they come up in several questions, I am not sure how to define that in the survey flow (they appear in several questions of the survey, but each respondent is only exposed to one of those, depending on their experimental group)

@TomG As TT1 and TT2 are defined in the survey via the responses to survey questions, how I am supposed to set them beforehand? Specifically because (as stated above) they appear a couple of times in the survey (however only once per respondent) & they are not the responses to the question itself but the number of words entered into a text entry field (captured with Java Script)

@Skulkarni2611 I have only tested in preview mode. thanks for the hint, I will try it through the actual survey invite later.
Userlevel 7
Badge +27
> @NikaMo said:
>
> @TomG As TT1 and TT2 are defined in the survey via the responses to survey questions, how I am supposed to set them beforehand? Specifically because (as stated above) they appear a couple of times in the survey (however only once per respondent) & they are not the responses to the question itself but the number of words entered into a text entry field (captured with Java Script)

You will need to calculate SumTT1TT2 after the values of TT1 and TT2 are set (or each time they are reset). Since TT1 and TT2 aren't calculated until a question is answered it doesn't make any sense to calculate SumTT1TT2 as shown in your survey image. You could just define it like you do the other variables then calculate it later.

Leave a Reply