A common request from researchers is to create summary variables for tables. This is usually for reporting reasons, and it allows table rows to be viewed through the context of one or more options. Rather than build such variables manually, use rowpunchsummary
to automate the creation of these variables. This substantially reduces extraneous survey source elements thereby reducing the opportunity for error.
Syntax
Add rowpunchsummary
to a table to create a summary variable on tables with rows and options. This tag is not valid for vscale
. The input to the tag is the label of the summary variable it creates. Condition and desc
decorators control the qualifying criteria and reporting descriptions, and rows
details which row IDs from the table should be included in the variable. Multiple rowpunchsummary
tags are permitted.
Note: Question labels do not automatically include a leading Q.
rowpunchsummary: QLABEL {if condition logic with iterator } {desc: Reporting Description} {rows: [IDs here] }
Example
The example below uses rowpunchsummary
to create two variables based on the Q1 table: one for brands the respondent is familiar with, and one for brands the respondent is unfamiliar with.
Here is QFAMILIAR and QUNFAMILIAR created by rowpunchsummary
, as seen in Topline report:
The code that would be needed to create QFAMILIAR and QUNFAMILIAR is below – this is what rowpunchsummary
automates:
FAMILIAR. Familiar variable Q1 type: checkbox selectby: condition optsfrom: T1.rows { if anyChecked($Q1R[id],3) } UNFAMILIAR. Unfamiliar variable Q1 type: checkbox selectby: condition optsfrom: T1.rows [1..3] { if anyChecked($Q1R[id],1) }
Tip! The rowpunchsummary
tag supports inclusion and exclusion syntax via the rows modifier. For example, instead of specifying {rows: [1..3]}
as shown above, {rows: -[4..7]}
could be applied.
Comments
0 comments
Please sign in to leave a comment.