Version Notice: This article covers features in our r9/IS Pro platform. If you're looking for information on this topic related to r8, see Expression Builder.
Data cuts are filters that allow users to define the scope of respondents to include in a report. The Expression Builder modal allows users to create, edit, and save data cut conditions quickly and easily without having to be directed to another applet. These data cuts may then be applied in any of the reporting applets or the Data Cuts applet, and can optionally be saved with a description for future usage.
Expression Builder tutorial
The following video contains an overview of how to use the Expression Builder tool to create data cuts for use with our reporting applets and Data Cuts applet.
Opening the Expression Builder
Each applet differs slightly in its layout, but how the Expression Builder modal is accessed is the same. The Expression Builder is accessed by selecting the Data Cut option in the Record Selector or Report Builder, and then clicking the wrench icon.
Note: When using the Audiences and Batches applets, click on the Apply Filter button to locate the wrench icon. The fields available will be those included in the System fields chapter and other user-defined fields associated with the contact lists.
Using the Expression Builder
To build a data cut expression, first select a question, variable, or table element from the Field dropdown menu. After selecting the survey field, specify the logical expression required for the field, then choose the applicable option(s). Once the first expression is built, press Apply. The expression will then be displayed in the Expression Output box as if it were programmed.
Note: If you combine additional filters (e.g., respondent status, Date/Time, etc.) with a data cut created in the Expression Builder, the resulting number of records could be different. For example, if the data cut did not originally define the respondents' status, it would include all records (all statuses) by default. Then, when the data cut is applied to the report, often Completes only is selected, which further reduces the overall count of respondents.
If additional expressions are needed for the data cut to create compound expressions, use the dropdown next to the Apply button to select an operator (and/or), and then repeat the steps above until your expression is complete.
After each expression is applied, it will appear in the Expression Output box. The resulting record count will be listed next to the Update button. If the expression is incorrect, press the Reset button to start over or click the Cancel button to exit the Expression Builder modal.
Tip! The order of operations is important. Review compound logical expressions that have operators (and/or) and review which expressions are grouped together in parentheses. The Expression Output field can also be edited manually if needed.
Use and save data cut
You have the choice to either use the filter without saving by clicking the Use Expression button, or use it and save it for future use. To save the data cut, enter a description in the text field at the bottom. This will then activate the Save and use Data Cut button. Clicking this button will save the data cut with the description provided and return you to the previous screen to continue working. Any saved data cuts will also be available for usage in all other places where data cuts can be applied.
Advanced data cuts
If the Expression Builder is not providing enough options for you, click the wrench icon in the bottom-left corner, and you will be brought to the Data Cuts applet. The Data Cuts applet offers more question types and operators in its menu to choose from, as well as other advanced options to build your logical expression. Once the data cut is created, it will be accessible via the Data cut dropdown menu in all other places where data cuts can be applied.
Expressions with three or more fields
When using the Expression Builder to create a data cut with three or more conditions in which both "and" and "or" are used, please review how parentheses are shown in the resulting expression. Incorrect placement may lead to unintended order of operations, potentially yielding an inaccurate data cut. If necessary, the parentheses can be manually edited to correct the order. If you edit the expression, press Update to recalculate the number of resulting records.
Compound expression example
Below, we have a common screener set up which qualifies respondents for the survey if they answer "yes" at Q1, or answer "sometimes" at Q1 and also select "once a week" at Q2. In the example below, how the conditions are grouped via parentheses makes a difference in the number of records that fit the filtering criteria established in the Expression Builder.
1. Do you eat spicy foods?
type: radio
1. Yes
2. Sometimes
3. Never
2. How often?
showif: anyChecked($Q1,2)
type: radio
1. Once a week
2. Once a month
3. Once every three to six months
4. Once every year
The first example's parentheses force respondents to fulfill two sets of criteria. First, they must select option '1' or '2' at 'Q1'. Then, they must also select option '1' at 'Q2'. This yields only 5 records.
However, this was not the way we intended to build the expression. We intended to write, "select option 1 (yes) at Q1" or "select option 2 (sometimes) at Q1 and also select option 1 (weekly) at Q2." By moving the outer parentheses, we can adjust the two groups of filtering criteria and achieve the desired expression. This new expression yields 24 records, instead of 5.
Reminder, double-check your expressions, parentheses, and operators. It can make a big impact in your results.
Comments
0 comments
Please sign in to leave a comment.