Version Notice: This article covers features debuted in our r9/IS Pro platform.
The collectionpunchsummary
tag creates a variable that records the collection headers in a list that had at least one of their "child" options selected.
Similar to rowpunchsummary
, collectionpunchsummary
is considered a summary variable that "rolls up" the data.
1. Which colors do you like?
type: checkbox
collectionpunchsummary: Q1SEL. Colors I like
10. Primary {collection header: y}
11. Red
12. Blue
13. Yellow
20. Secondary {collection header: y}
21. Orange
22. Purple
23. Green
Details
- Apply the
collectionpunchsummary
to atype: checkbox
ortype: coded multiple select
question. - The tag's input includes the label and description of the summary variable it creates.
- Inclusion and exclusion filters can be added immediately after the label and description.
Note: Collection punch summary variable labels do not include the leading 'Q' by default. If a leading 'Q' is desired, be sure to include it in the collectionpunchsummary
tag as shown above.
Additional examples
Excluding a category
In Q2 below, the collectionpunchsummary
tag automatically creates the summary variable 'QCATS'. QCATS will punch '1. Food' if any of the options 101 - 106 are selected, '2. Alcohol' if options 201 - 203 are selected, and so on. However, a filter is applied to exclude the Alcohol category from QCAT's data. Even if options 201 - 203 are selected, the Alcohol category will not be recorded at QCATS.
setlist: categorieslist
1. Food {collection header: y}
101. Dry groceries
102. Fresh produce
103. Fresh meat or seafood
104. Frozen foods
105. Dairy products
106. Prepared food
2. Alcohol {collection header: y}
201. Beer
202. Wine
203. Liquor
3. Health & beauty care products {collection header: y}
301. Over-the-counter medications
302. Cosmetics
303. Personal care products
4. Baby care products {collection header: y}
401. Diapers/wipes
402. Formula
403. Baby food
2. Which items have you purchased in the past 6 months?
type: checkbox
optsfrom: categorieslist
collectionpunchsummary: QCATS. Categories purchased -[2]
Referencing a collection punch summary variable
Again at Q2, we have the collection punch summary variable QCATS. At quota QCAT_ASSIGNED, we use header:
only
to filter in only the category headers from the list, making it the option set. If a header option ID is punched at QCATS, it qualifies for the quota.
setlist: categorieslist
1. Food {collection header: y}
101. Dry groceries
102. Fresh produce
103. Fresh meat or seafood
104. Frozen foods
105. Dairy products
106. Prepared food
2. Alcohol {collection header: y}
201. Beer
202. Wine
203. Liquor
3. Health & beauty care products {collection header: y}
301. Over-the-counter medications
302. Cosmetics
303. Personal care products
4. Baby care products {collection header: y}
401. Diapers/wipes
402. Formula
403. Baby food
2. Which items have you purchased in the past 6 months?
type: checkbox
optsfrom: categorieslist
collectionpunchsummary: QCATS. Categories purchased
CAT_ASSIGNED. QUOTA | Final Category Assignment
type: quotas
maxgroups: 4
optsfrom: categorieslist [header: only] {if anyChecked($QCATS,[id])}
coded multiple select
The following example places collectionpunchsummary
on the type: coded multiple select
variable QL3M. While QL3M records each individual store purchased from in the past three months, it also creates the summary variable 'QL3M_LGE' to record the store type purchased from in the past three months (for example, Big Box Stores, Supermarkets, etc.).
setlist: BRANDS
100. Big Box Stores {collection header: y}
11. Wal-Mart
12. Target
13. Kmart
200. Supermarkets {collection header: y}
21. Publix
22. Kroger
23. Winn Dixie
300. Hardware Stores {collection header: y}
31. Home Depot
32. Lowe's
33. Menard's
400. Department Stores {collection header: y}
41. Sears
42. JC Penney
43. Nordstroms
4. Which stores(s) have you purchased from and when?
type: radio table
1. Purchased from in the last 3 months
2. Purchased from in the last 6 months
3. Purchased from in the last 12 months
4. Purchased from over a year ago
5. Considered but never purchased from
6. Never purchased from
rowsfrom: BRANDS
L3M. Last 3 months - individual stores purchased from
type: coded multiple select
optsfrom: BRANDS {if anyChecked($Q4R[id],1)}
collectionpunchsummary: QL3M_LGE. Store types purchased from in L3M
Comments
0 comments
Please sign in to leave a comment.