This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help

Previous Topic

Next Topic

Book Contents

Book Index

Step 2: Using a derived variable to calculate an appropriate voucher code

You can make the questionnaire display a different offer depending on the size of the group. Create a derived variable which works out which discount to give according to the number of people in the group.

  1. Click Variables window button on the Snap toolbar to display the Variables window.
  2. Click New button on the Variables window toolbar to add a new variable.
  3. Specify the Variable details:

    Name: Discount

    Label: Percent Discount

    Type: Derived (the variable will derive its data from the Total variable that you have just created,)

    Response: Single (the data will be coded into bands).

  4. Double click in the first code label and enter 0%. This is the discount for less than ten people. It will never be seen in the questionnaire.

    Derived variable with insert button highlighted

  5. Press [Tab] to move to the Values column. Enter Total <10.
  6. Press [Tab] to move to the next Label field and enter 10%. Then enter Total <20 as the Value. Since the codes are checked in order, a value less than ten will already have been coded.
  7. Press [Tab] to move to the next code. Enter 20% as the Label and Total <30 as the Value.
  8. Press [Tab] to move to the next code. Enter 30% as the Label and Total <40 as the Value.
  9. Press [Tab] to move to the next code. Enter 40% as the Label and true as the Value. This catches all numbers above 39.
  10. Click Save button to save the coded variable.

See Also

In-survey calculation tutorial: Displaying a total and providing an appropriate discount code

Step 1: Using a derived variable to total the number of adults and children

Step 3: Use your calculated results in a later question

Step 4: Using routing (skip logic) to show the question when necessary