When you have a quantity question in your survey, you sometimes want to split the results into bands for analysis (for example, when you wish to split ages or salaries into ranges).

There is a quick way of doing this using numeric variables.

Numeric variables are a type of derived variable, i.e, they contain information that is derived from people’s responses. This worksheet will use the data in the snCrocodile survey supplied with Snap to show you how to band the amount spent.


Quantity data provides a continuous set of values. Because of this it is difficult to find out how values are distributed, as every response could be different. If you want to see what ranges responses fall into, you have to group the responses together. You can choose how to group your responses, though it is best to group them into equal size bands to see how the responses are distributed. You need to choose how wide the bands are to make sure that you don’t miss any important spikes or dips (which might average out over a wide band).

To do this, you need to find out what the minimum and maximum value responses are, and use this information to divide the range into equal bands. Snap allows you to display the minimum and maximum value in a table of descriptive statistics.

Once you have decided on your bands, you must sort the responses into those ranges, so you can use them in charts and tables. This is done by creating a variable derived from the original response.

There are several types of derived variables in Snap. These are known as derived, numeric, pre-coded and alphanumeric variables.

  • Derived is a general type that can be used on any type or number of variables.
  • Numeric, pre-coded and alphanumeric variables are generated from a single variable. You set this variable as the data source, and then describe how it is converted into the new variable.

Derived variables have much more flexibility, but if you are converting a single variable into a set of ranges or values, it can be quicker to use one of the other types.

Summary of steps

Step 1: Decide on your bands
Step 2: Create the variable
Step 3: Analyse the bands
Step 4: Do further analysis of a specific subsection

Step 1: Decide on your bands

When you are splitting a quantity into bands, it is good practice to choose bands of equal size. Start by finding what the maximum and minimum values are.

  1. Click Table button to create a table.
  2. Set the Analysis value to Q5 (the “Amount spent” question).
  3. Select Statistics table from the drop down list for the Break.

    Results Definition - Break - select Stats table

  4. Click the Descriptive Statistics tab to select what information will appear in your table.
    Results Definition - Descriptive Stats tab
  5. Use the [<] button to remove all entries from the Used column apart from the Minimum, Maximum and Range statistics.
  6. Click [OK] to create your table.

    Table: descriptive statistics of min max range

This tells you how the top of bottom limits of your bands. For a coarse grain banding, you could split the data into bands of 1 – 7.99 8 – 14.99 and 15 – 22.

Step 2: Create the variable

  1. Open the snCrocodile survey.
  2. Click Variables window button on the toolbar to open the variables window (or select View | Variables).
  3. Find Q5 in the list of variables to check that it is the one you want. This is the variable where people’s total spend is recorded.

    VW: Variables window (small) showing Q5 selected

  4. Click New button on the variables window toolbar to create a new variable.
  5. Set the Type to Numeric.
  6. Add a label (e.g. Banded spends) to describe the variable in any analyses.
  7. Set the Response to Single.

    Variable Details - Response - Single

  8. Click the Variable definitions button button to display the variable definition.
  9. Type Q5 in the Source field. This means that the data will be derived from the response in Q5.
  10. Click in the empty Code Label field.

    Variable Details - click Code Label field

  11. Enter your first range. Type Low spend (£1 – 7.99) as the label. Press [Tab] to move to the Values field and enter 1 to 7.99.
  12. Press the [Tab] key to enter a new code and give it a label of Medium spend (£8 – 14.99) and give a value of 8 to 14.99.
  13. Repeat to create a code with label High spend (£15 – 22) and a value of 15 to 22.

    VD: banded analysis of values, copped codes only

  14. Click Save button to save your new variable.

Step 3: Analyse the bands

  1. Click Chart button on the toolbar to create a chart.
  2. Set the style to Bar 2D Labelled percents. Set the analysis value to the name of your new variable (V2C) and check the Transpose box.

    RD: definition showing v3 bar graph (cropped)

  3. Click [OK] to display your chart.

    RW: Chart showing banded spend analysis as 2d bar

    You can see that nearly all the responses are in the lowest band. For further detail, you will need to redefine your variable or create a new variable with narrower bands.

  4. Open the new variable and select the first code (Low spend).
  5. Change the values from 1 to 7.99 to 1 to 3.99, and change the label to match.
  6. Click Clone button to duplicate the code.
  7. Change the new code values to 4 to 6.99 and edit the label.
  8. Duplicate the code again and give it values of 7 to 9.99.
  9. Change the Medium spend code values to 10 to 12.99.
  10. Duplicate the code and give the new code values of 13 to 15.99.
  11. Change the High spend code values to 16 to 18.99.
  12. Duplicate the code and give it values of 19 to 22.

    RW: Numeric variable fine band definitions for spend

  13. Click Save button to save your changes.
  14. If your chart is still open it will now have Out of Date on the title bar.

    AW: out of date title bar - cropped

  15. Press 1 2 3  button to update the chart.

    RW: Chart showing banded spend analysis as 2d bar

Step 4: further analysis of the low end values

The previous graph showed that the most people spent less than seven pounds in the shop, which the other bands being roughly equal.

You could further analyse the low end spending in a separate graph.

  1. Select your new variable in the variables window and press Clone button to duplicate the variable.
  2. Change the label to something like Low end banded spends – to make it clear that this is only a subset of the data.
  3. Change the first code label to 1 – 1.99.
  4. Change its value to <2. All values that are less than 2 will now be stored in this variable.
  5. Change the second code label to 2 – 2.99 and change its value to <3. Since the values lower than two have already been placed in the first code, values from 2 to 2.99 will now be in this variable.
  6. Continue setting up the codes until you get to 6 – 6.99 and <7.
  7. Click Save button to save your changes.
  8. Create a bar chart displaying your new variable.

    RW: Chart showing banded spend analysis as 2d bar

You can see from this that the most popular lower end spend is between three and four pounds.


This worksheet has shown you how to split the responses in a quantity variable into bands for analysis. It has explained how to see what the maximum and minimum values for the variable are, and how to create a numeric variable to store the banded information.

It also shows you another way of setting up values for banded variables using the < symbol rather than a range.

For more information about analysing quantity variables, see the section Quantity responses.

There is a worksheet available on analysing literal variables using a derived variable.

If there is a topic you would like a worksheet on, email to snapideas@snapsurveys.com