Skip to main content
A variable can calculate a value from answers or read a dataset column or link attribute. Use it to define a reusable segment or numeric result. Before you start, save the source questions and decide the result for every case, including missing inputs.
1

Open Variables

In Create, scroll to Variables below the questionnaire, then select Add variable. If the section is hidden, select Add variable section. The new variable scrolls into view with the cursor in its name.
2

Choose the result type

Name the variable and choose Categories or Number. For a category result, define the categories before assigning cases. In a category list, press Enter to add the next category and move the cursor to it.
3

Define the derivation

Enter a formula for a numeric variable. To use ordered cases, open Variable settings → Set with rules and define the conditions and Otherwise result. Category variables use rules to assign categories.
4

Test sample answers

Save the questionnaire and generate a participant test link from Test. Repeat the test with inputs for each case, values at boundaries, and a missing source where skipping is allowed. Compare the variable column in Responses with the expected result.
5

Save and verify

Save the questionnaire, complete a participant test, and enable the variable column in Responses. Confirm that the saved value matches the source answers.

Order cases deliberately

For a frequency segment, define regular cold-coffee drinkers from the saved frequency choices and use Otherwise for the remaining cases. Put more specific cases before broader cases that would also match. A case’s ⋯ menu offers Add condition for an answer condition and Add formula condition for a numeric comparison written as a formula; one case can combine both. Do not label an unanswered source as a substantive answer without an explicit rule. To flag an item ranked first or in the top N of a ranking question, set the condition’s rank to ranked 1st or in the top N. See Configure conditions and routing. A formula reads a single-choice answer, or a matrix row’s answer, through its options’ Numeric value: set it from each option’s menu, for example 4 for Totally agree to 1 for Not at all. The same values give a matrix its mean scores in analysis. A case with no value, an empty formula, or a comparison with a value that is not a number appears in the Fix problems list and blocks saving. See Fix survey problems.

Use the variable in the study

Select the variable where the relevant condition, piping, or analysis control offers it. Its inputs must be available before participant-facing logic uses it. Quota controls enforce their own eligibility restrictions; a variable appearing in analysis does not make it a valid quota source. If you add a Screening through Variable settings, screening waits until the required inputs have been answered. Test both an excluded case and a case that continues.
Filtered completed test response showing source 30, custom answer 35, and derived value 360

Show the source and variable together: the completed test stores 30 per month and 360 per year.

Change a variable after collection

In Testing and live studies, open the Add menu or Your variables from the menu beside Plan settings in Analysis → Analysis plan. Review the calculation before saving. Variables referenced by live routing, screening, piping, or quotas are locked. In Draft, use the study builder. The Plan assistant can also propose a variable. Review its definition, then select Add to the study or Edit; the proposal is not saved before your confirmation. Select a saved variable explicitly in the plan where needed. Wait for variable calculations to finish before generation. Check existing response values and dependent charts, regenerate the plan outputs, and verify their bases.

Read external values

A variable can read a customer-file column or an entry-link attribute: open Add variable and choose From your file or From the panel link. When the study has no file or no link value yet, the item says what is missing, for example No file yet — upload one in Data sources, and selecting it opens Data sources. Choose a compatible result type, including text for a textual source, and check missing values. These entry-time values are not backfilled for earlier sessions. A file keyed by the export’s consumer_survey_id is matched to existing respondents instead. Follow Use customer files and link attributes to choose how the row is found and map file values to categories.

Assign respondents to cells

In a monadic or split test, a variable can place each respondent in one cell instead of calculating a value from answers.
1

Add the assignment

Open Add variable and choose Random assignment. A variable named New assignment appears. Rename it and enter one category per cell; at least two are required.
2

Choose how respondents are placed

The editor reads Each respondent is placed in one category. Choose evenly to place each respondent in the category that holds the fewest respondents so far, or at random for a random draw. Respondents who have started count, including those who left without finishing, as do completed ones; screened-out and over-quota respondents do not. Ties are drawn at random, and test respondents are counted apart from live ones.
3

Balance within a profile

With evenly, within can list single-choice questions asked of every respondent, or variables that always have a value. The respondent is placed once all of them are answered, in the category that holds the fewest respondents with the same answers. With the whole sample, the respondent is placed as the interview starts, before any screening or quota answer is known.
4

Route each cell

Use the variable in conditions to show each cell its stimulus and questions. Test one respondent per cell and check the variable column in Responses.
evenly with the whole sample balances the size of each cell, not the profile inside it. Two cells of 300 end with about 300 respondents each, but their gender or age split can differ. To get the same profile in every cell, list the profile questions under within. The cell is drawn once and kept when the respondent changes an earlier answer. An assignment cannot carry screening rules or quotas: its categories are already filled evenly, and the panel target sets the total. To control the profile of each cell, set the quotas on the whole sample and balance the assignment within the quota questions. See Set quotas for a monadic or split test.

Keep several values or one value per concept

A variable can hold several categories or one result per concept. Choose the intended shape before defining its rules. A per-concept variable is read and exported with its concept context; it is not one scalar shared by every concept. Inspect each concept’s values in Responses. A file lookup can use an answer as its row key as well as entry-time identifiers. Choose the key question in the variable editor, place it before the first use of the variable, and test a missing or unmatched key. A text result can supply text conditions or piping. The analysis assistant can propose variables and answer scores. Review every card before saving; calculated values may take time to fill existing responses. An in-chart variable remains local to that chart or plan split instead of becoming a study variable.