Market researchers commonly use banner tables to show results that are broken down by several key pieces of information at the same time. For example, a banner table may display brand awareness across several demographics, like Age, Gender, and Region, so that all of those key breakdowns may be viewed at a glance.
In most programs, banners are created as a part of a table. However, in Q, a banner is a special type of Variable Set that is used to bring together categories from many distinct Variable Sets. If needing to show similar variables on a table you should consider using Merge to group them into a new Variable Set. The banner is not fixed to a particular table - you can use and reuse the banner on as many tables as you like (as you would with any variable set). Like other variable sets, if you modify a banner on one table, all other tables using that banner will update to reflect the change.
Creating a banner can be helpful to see more than one question across columns when creating crosstabs. Other instances may require questions to be “nested”, with one layered beneath another, in order to see how data is split across different response options.
Method 1 - Drag and drop
- From the toolbar, go to Create > Banner > Drag and Drop...
- Start typing in the name of the first variable you'd like to use in the banner in the Find field. In this example, I will look for "collapse" because I want to use the "Age - Collapsed" variable.
- Drag and drop the variable into the Questions to include: window.
- Search for any additional variable(s) that you'd like to use in your banner in the Find field and drag and drop into the Questions to include next to the original variable. You can place the variable(s) to the right or left, depending on the order you desire.
- OPTIONAL: You can nest questions so that one is layered beneath another and you can see how the options are split further. Here, I'll add a variable that indicates if children are present in the household by searching for the variable via Find and drag and drop it beneath the "Age - Collapsed" variable:
You can customize your banner further with the following options/fields:
- Name - Name for the banner to be created.
-
Table display options:
- Add sub-NETs - When checked, the NET of each question is also included in the banner.
-
Add overall NET - When checked, a single NET is added to the end of the banner, representing the combination of all of the questions' categories. An alternative is to add a Total (see
[INSERT LINK HERE: Editing a banner by modifying a table]).
- Add column spans of question names - This causes the name of the question, or, where there are duplicates (see the comments above for Replace question name with span where there are duplicates), the name of the original question, to appear as a span, as shown on the example to the right.
-
Dragging options:
- Duplicate questions dragged onto banner - When a question or variable is dragged into Questions to include a new question is automatically created in the Variables and Questions tab. This new question stores any modifications you make within the banner (eg, merging of categories or modifications to the Value Attributes. If Duplicate questions dragged onto banner is not ticked, a new question is not created, and any changes made in the banner will also be applied to other uses of the question in the project.
- Replace question name with span where there are duplicates - Q does not permit multiple questions to have the same name. Consequently, when a question is dragged onto the banner and duplicated, the new question is automatically created with a unique name. For example, the duplicate of Age will be called "Age 2". However, usually people will prefer to have the original name appear. Consequently, when Replace question name with span where there are duplicates is selected, Q automatically hides the name of the question and instead creates a new span using the original question name.
Method 2 - Custom Code
For information on how to write the appropriate code, see How to Construct Logic Variables in Q.
1. From the toolbar, go to Create > Banner > Code...
2. Update the Label to something appropriate for your first banner point. In this example, I will use "Young males".
3. Just below the Expression box, tick the Show value labels box.
4. In the Expression box, enter the logic, based on the criteria needed for the banner point. In my example for young males, I am defining it as:
Q2 = [Male] AND Q3 <= [25 to 29]
5. To create a new banner point, click on New at the bottom of the banner creator window.
6. Add a Label for the next banner point. In this example, I will add "Young females".
7. Below the Expression box, tick the Show value labels box.
8. In the Expression box, enter the logic, based on the criteria needed for the banner point. In my example for young females, I am defining it as:
Q2 = [Female] AND Q3 <= [25 to 29]
9. Continue adding new banner points as necessary with the required code for each. When done, click OK.
OPTIONAL: If you do not already have the JavaScript code written, you can find the variable(s) that go into the formula via the Find menu:
You will need to reference the value attributes (eg, "Male"). You can read more about creating logic variables here: How to Construct Logic Variables in Q.
There are some tools that you can use to help you construct your formula and to check that it is correct.
Right-clicking variables:
If you right-click on one of the variables in the Find section, you have two options available:
- Values - This lets you see the values and categories that are available for this particular variable. This will help you work out what values to refer to in your expression.
- Insert reference - This will bring up a list of already built references that you can use as a starting point to building your formula.
Check the preview of results window:
For added assistance in ensuring that your logic has been set up correctly, refer to the Preview of results located at the bottom of the window. This will show you a list of all of the values for all of the variables that you have used in your formula. For example, in the screenshot above, it shows all the values for gender. Then, the Result column shows the value that the variable will take. I have ticked the Collapse duplicate inputs box to condense the results to make the final counts easier to read.
A value of 1 means the person in this new banner category, a value of 0 means they are not, and a value of NaN (missing data) means that the person is not included in the sample for this variable. You can show labels instead of numeric values by ticking the Show labels box.
NOTE: To edit an existing banner right-click on any banner point on an output, and go to BANNER > Edit or right-click any banner variable in the Variables and Questions tab and select Edit Banner.