Server User Guides > Survey Tabulation > Working with variables > Adding a category that is calculated from other categories
 
Adding a category that is calculated from other categories
Sometimes you might want to add a category to a table that contains the results of a calculation based on the values in other categories. You can do this by adding a derived category to the variable. For example, you can add a “55 and over” category to the age variable that is calculated by adding the values in the 55-64 years and 65+ years categories.
These instructions describe how to add a derived category to a variable so that it appears in all tables. If you want to create the derived category in a specific table, use the Edit Axis dialog.
To add a derived category to a variable
1 Select the Define tab.
2 In the Variable List, select the variable you want to change, and then click Variables > Edit.
The Edit Variable dialog opens: see Edit Variable dialog.
3 Select the category in front of which you want the derived category to appear. To add the category at the end of the list, do not select anything.
4 From the menu at the top of the Edit tab, choose Insert.
The Insert Item dialog opens: see Insert Item dialog.
5 In the list of Available Items, select Derived Element.
6 Click Add, and then click OK.
This inserts the new category into the list of items on the Edit tab.
7 Enter a label for the new category, for example, 55 and Over
8 In the row that contains the new category, click Edit item. The Define Derived Element dialog opens: see Define Derived Element dialog.
9 Type in the expression that defines the new category (using the names, not the labels, of the categories that the derived category is based on), for example:
E5564_years + E65_years
Click OK.
10 Click OK again to close the Edit Variable dialog.
The changes will be applied to any existing tables that include the variable next time you populate them, provided you haven't used the Edit Axis dialog (see Edit Axis dialog) to specify how the variable is to appear in any of those tables).
See also
Working with variables