Can questions be set up with calculations in them? | XM Community
Solved

Can questions be set up with calculations in them?

  • 9 April 2018
  • 5 replies
  • 139 views

Badge +2
I'm in charge of an survey on salary & wages. There's one section where respondants report the annual salary. Is there a way for them to put in the hourly wages, and then the survey converts it to annual wages?
icon

Best answer by Ann_Schneider 11 April 2018, 18:45

View original

5 replies

Userlevel 7
Badge +27
Do you want to display the calculated annual survey on the same page where they enter the hourly wage? If so, you'll need to do the calculation in JavaScript. Otherwise, you can do calculations with $e{ _calculation expression_ }.
Badge +2
Interesting...I don't think we've ever explored the Java Script functions at our company. More research for the research!!
Badge +2
OMG, I just looked into your reference to calculations with $e. I had no idea that Math Operations existed in Qualtrics. I've got a lot of testing to do, but it's going to be a game-changer for us!!
FYI, here's the description for Math Operations:
https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/math-operations/
> @TomG said:
> Do you want to display the calculated annual survey on the same page where they enter the hourly wage? If so, you'll need to do the calculation in JavaScript. Otherwise, you can do calculations with $e{ _calculation expression_ }.

Hello, My colleague and I am designing a survey using Qualtrics. On one page respondents must move a series of sliders.
We need to display the output of a function of the values of the sliders on the same page, ideally also in the form of another slider.
All of this must be done *while* the respondent moves the sliders.

Concretely, suppose the following:

value of slider 1 = 30;
value of slider 2 = 10;
value of slider 3 = 0

Output to be displayed = 30 x 20 + 10 x 5 + 0 x 15 = 650

where the 20, 5 and 15 are just arbitrary constants in the background.

If the user were to move slider 1 to 31, the displayed output should automatically update in real time to 670.

Any tip on how this is done? We're newbies to qualtrics and completely inexperienced with Java, so we'd be very grateful to anyone willing to provide us with working code. Thanks!
Badge +9

Thanks so much for asking and answering this question! Super helpful!!

Leave a Reply