Sometimes you may want to display text or symbols in the cells of a table. For example, the following table (based on the Employee Data sample, available with the IBM® SPSS® Data Collection Developer Library) has an additional Currency row that displays the currency type, and a row that acts as a dividing line before the final row:
You can create text-only rows by adding a Column text item to a variable, and specifying the text to appear in the cells when the variable appears in the rows of a table.
You can add the same text to each column of the new row, or you can enter different text in each column. In the above table, the first column of the row used as a divider contains different characters.
The text appears only when the variable is on the side of a table. If you add the variable to the top of the table, only the heading text appears. Text-only rows are not displayed in charts.
Note: If you want to append text to the contents of an existing cell, for example, to add a currency symbol, you can add a prefix or suffix to the cell contents in the Table Properties dialog box. See the topic Adding and Removing Cell Contents for more information.
These instructions explain how to add text rows to a variable on a single table, rather than for all tables. This is because the text in the row may be specific to the categories in the variable on the top of the table and therefore inapplicable when tabulated with other variables.
► Create the table by adding the variables to the top and side of the table.
► In the Design pane, select the variable on the side of the table:
► From the menu, choose
This opens the Edit Table Variable window and displays information about the variable.
► From the menu, choose
This opens the Insert Categories dialog box.
► In the list of Available Items, select Column Text, and choose the >> button to add it to the list of items to insert.
► In the Description field, enter the heading for the row, or remove the text to leave the heading cell blank.
► Choose OK to close the Insert Categories dialog box.
► In the Edit Table Variable dialog box, select the new category and use the up and down buttons to move it to the position where you want it to appear.
► If it is not already visible, choose
from the menu to display the Properties pane:
► In the Column Text field in the Properties pane, type the text that you want to appear in each column for the new row.
• If you want the same text to appear in each column, simply type the text; for example: $.
• If you want different text to appear in each column, type the text to appear in each column, separated by a semi-colon; for example: ==========;----------;----------;----------
• If there are more columns than text, the text will repeat from the beginning in the remaining columns. This means that if you want to repeat text for a set of columns, say in a nested table, you can type the text for the first set of columns and it will repeat for the remaining columns. For example, =====;----- will display as ===== ----- ===== ----- ===== ----- if there are six columns. If there are more text strings than columns, the additional strings are ignored.
► Choose Save and Close to save your changes and return to the Design pane.
► Choose the Results pane to regenerate the table and display the results.