QUALTRICS TOOLCHEST: Using Loop and Merge to Simplify and Shorten Your Survey and Speed Up Analysis

One reason I’ve been a proponent of Qualtrics for many years now (I started using the platform during grad school in 2008) is because of the way it allows me to simplify the creation of complex surveys, which speeds up both the time I spend creating and editing surveys and the time I spend in analysis. But I’ve also found that some of the best features Qualtrics has to offer require a little bit of understanding before you can implement them into your survey design, and Loop & Merge can be really helpful if you design your survey with this function in mind.

So, what is Loop & Merge? It’s basically a way of asking a respondent to pick a few items they know something about from a list and then to ask the same series questions about each item.

For example, I might give a respondent a list of brands and ask them to select each brand they’re familiar with. Then, I can use Loop & Merge to take them through a bunch of questions about each brand, such as:

  • What some adjectives that describe this brand?
  • What are some words that describe what you like about this brand?
  • What is your level of preference for this brand?
  • What is your likelihood to purchase this brand?
  • What is your likelihood to recommend this brand?

So, let’s say I have 5 brands to measure and the 5 questions above. A Qualtrics novice might approach this by creating 5 sets of questions – one for each brand – and use display logic to only show the questions to a respondent if he/she indicates in a previous question some familiarity with the brand. That’s 26 questions total which have to be created, and 25 which have to have some display logic set. If the survey creator needs to make a change to one of the five above questions, they have to do it five different times – once for each brand. And then, when it comes time to analyze the results, Qualtrics doesn’t have an easy way to allow the researcher to compare all five charts, so the researcher either has to look at five different charts or create a manual chart or graph in a program like Excel, SPSS or Powerpoint to showcase the results.

With Loop & Merge, the same thing can be done with just six questions. Display logic doesn’t need to be coded, edits take far less time because they only need to be made once, and analysis is far simpler because the data can be easily broken out in a single display within Qualtrics. The time savings are significant. And, as we’ll see later, there are also many ways to use Loop & Merge to add in unique questions for each brand without sacrificing this ease!

So let’s dive in. Imagine we are doing a brief survey on how pet owners care for their pets. We first need to determine what sort of pets they have, and even though we know the answer is mostly going to be dogs or cats, we need to account for those who have both, and we also may want to consider those who have other pets such as fish, birds, ferrets, reptiles and so forth.

We’ll begin with a simple question to help identify the type of pet each respondent owns by using multiple answer format:

Now the fun begins. We’re going to click Add Block below our new question and create a new question block. And we’re going to write five questions which will all be in multiple choice format:

How many [of this type of pet] do you currently have?

Which of the following ranges best describes the amount of money you spend each month on food for your [of this type of pet]?

Which of the following ranges best describes the amount of money you normally spend each month on veterinary treatments (routine visits, medicine, etc.) for your [of this type of pet]?

Which of the following ranges best describes the amount of money you normally spend each month on supplies (toys, bedding, grooming supplies, leashes, harnesses, etc.) for your [of this type of pet]?

Which of the following statements accurately describe special activities you have undertaken to care for your [of this type of pet] over the last month? (Please select all that apply)

(Don’t worry – we’ll include the answers later.)

Right off the bat, you’ve probably noticed that we have some placeholder text in our questions saying [of this type of pet]. We will fill that in eventually with some piped text from our Loop & Merge function. But since we haven’t turned it on yet, Qualtrics can’t create the correct piped text syntax, which is why we’ve used a placeholder for now.

With our questions programmed, we now need to return to the top of our block and click on Block Options. There, we’ll see a choice for Loop & Merge.

By clicking on this, we’ll be taken to a window that is going to ask us how we’d like to set up our Loop. We first need to click on Turn On Loop & Merge and then check the box for Loop based off of a question. The question we’ll choose is the original question where we asked which sort of pet our respondent has, and we’ll pick Selected Choices.

This will assign the column called Field 1 to map to our first question. But we don’t need Field 2, so go ahead and click the red circle to delete that. Then, let’s go ahead and randomize the loop to ensure that we randomize the order in which pet names are shown for those who have multiple pets (just to hedge ourselves against order effects) by clicking randomize the loop order. Finally, click save.

Our survey is now set up to:

  • Ask the respondent which pets he/she has
  • Take the respondent through five questions for each pet he/she has
  • Finish

If we wanted to, we could include another block (perhaps asking the same questions of everyone or adding another Loop & Merge block), but there’s no need to do so in our demo. After all, we want to see what this looks like in analysis! So, let’s finish off those questions. We need to do two things.

First, we need to replace all of our placeholder text [of this type of pet] with piped text which we’ll get by clicking on a question, then clicking the Piped Text tab to take us to a menu where we’ll select Loop & Merge -> Loop & Merge Fields -> Field 1.

This will result in some funky text that looks like this: ${lm://Field/1}. Replace all five mentions of [of this type of pet] with your piped text.

Then, let’s add some choices to each question. The first four are all single answer, and the final question is multiple answer. Here’s what I keyed in:

On Q6, you might notice that I went ahead and included some piped text in the question choices themselves. This helps the questions make more sense to the respondent and helps to keep things a little cleaner. We might also want to add some display logic on the last choice there about off-leash parks – this should probably only show up for dog owners. We simply click on the blue arrow next to the statement, click Add Display Logic, and then set the statement to only display if Dogs Is Selected in our original question.

Awesome! We’ve got a survey. Now let’s generate some data for it so we can see what it’ll look like in analysis. We do this by scrolling up to the top of the page, clicking the Tools menu, then selecting Review -> Generate Test Responses like so.

I generated 200 responses. It takes a little bit of time, and the data aren’t going to be very realistic because Qualtrics goes through and selects elements randomly. (I wish you could easily set conditions, but you can’t, and the automated response tool ignores validation criteria!)

Now, Click on the Reports tab in the gray bar. You’ll notice that the automatically generated Results report is… kind of a mess. It creates a page for every iteration of the Loop & Merge by adding a number and underscore before the question number. For example, Question 2 for dog owners is labeled as 1_Q2 – How many [Field-1] do you currently have? Ugh. That’s not useful at all.

Fortunately, we have this other feature called Reports we can use. It’s right below the word Survey in the gray bar. Click on it, and create a new report. I called mine “Q2 Comparison” because that’s what we’re going to create, but you could easily create a page for each of our five questions if you really wanted to.

I think a useful data display for comparing the frequencies of eight pet types would be stacked horizontal bars. These are quite easy to do, and they just require a little bit of setup – no more than a few minutes of your time per question.

Begin by clicking “Insert” on your blank page and then selecting Visualization -> Chart -> Bar Chart:

Qualtrics will ask you to select a data source metric. What we want to add is 1_Q2 – DogsHow many [Field-1] do you currently have?, and it’d probably be most useful to set the metric itself to percentage.

Now click below the metric to select + Add Metric and a new window will pop up. Change the data source to 2_Q2 – Cats – How many [Field-1] do you currently have? and notice that you have an additional option to change your label this time. Type in the word “Cats”, then click off the window somewhere and click back on your Dogs metric and you can change its label as well. What you now have should look something like this:

Now, add the remaining metrics for your other animal categories. You should have eight in all. Your result will be a bit messy, especially if you stretch it to fill the page like I did:

We can make it look a lot nicer. First, click Edit All Metrics and, using the Options tab, set the Decimal Places to 0.

Then remaining in the gray bar on the right, scroll down until you see some check boxes with options. Check the following:

  • Show data values
  • Stack Chart
  • Transpose
  • Horizontal Bar

Now you’ll have a chart that looks like this:

This chart is so much easier to read! We now can find out very quickly what percentage of dog owners only have one dog, what percentage of cat owners have 6 or more, and so forth. And we can create similar displays (or tables, if you’d prefer) for all of our other questions as well.

If you want to remove the chart title, click Options above the chart and Remove title. You can then click Insert -> Text -> Text Area and create your own. You may just need to fiddle with resizing your table to make it all fit on one page.

Once that’s done, you can publish this to a PDF or to a public report link using the handy tools on the top-left of the page. What’s more, you can create more pages with more charts, you can write up your summary findings, you can flip this around into Slide format and export it to a format friendly for Powerpoint – the choice is yours!

Hopefully, this quick walkthrough on Loop & Merge has been helpful. But before we conclude, here are a few finer points worth knowing:

At present, you can only use Loop & Merge with a question or a set of alternatives you enter into your Loop & Merge fields manually, not embedded data. I don’t know why Qualtrics doesn’t allow you to utilize Embedded data for Loop & Merge fields (as the possibilities would be amazing!), but the platform is set up to only allow you to utilize manual entries or question choices.

Can you get around that with some fancy programming? Yes. Does it work very well? No, and you’ll probably have a lot of errors on your survey if you overlook a bug in your logic, which is quite easy to do.

Loop & Merge doesn’t have any sort of conditional logic to determine what piped text is shown to respondents. It’s quite simply based on displaying elements from questions, and the only real flex you have is whether or not the choices were or weren’t selected by a respondent. In order to get around that to showcase something more sophisticated, you have to program some branch logic, which doesn’t work terribly well in a lot of applications.

For example, I had a question in a survey where respondents could select multiple answers about their familiarity with a brand. I had to distill it down to a matrix where respondents selected “I know the brand” or “I don’t know the brand” for each brand presented to get Loop & Merge to effectively work. My design was far more elegant than the clunky reality I had to ultimately utilize.

Loop & Merge is hard for those providing you survey feedback to conceptualize and understand. I have often found that I spend more time explaining Loop & Merge to clients and end-users than is productive for any party’s time, so I often implement it late in the design of my survey after everything has been approved and we’re ready to move on to testing.

Those providing feedback can generally understand the concept once they see it in action, but during the earlier phases where we’re crafting questions, they tend to work better from a Word document or Powerpoint deck. Most end-users have a very difficult time reading Qualtrics survey exports to Word that contain piped text, embedded data and so forth, so as a general best practice, I only share this with them if they’re relatively sophisticated in their understanding of Qualtrics. Otherwise, I keep a working document for the survey design and then port it to Qualtrics when I’m ready to implement it.


I hope you enjoyed this article. Here’s a link to the Survey Preview and to the QSF file if you’d like to refer to either. If you’d like to discover more Qualtrics tips and tricks, be sure to check out other articles in our series, and if we can help you or someone you know with a Qualtrics question or problem, please contact us!