Deriving Multiple Fields

Setting the mode to Multiple within a Derive node gives you the capability to derive multiple fields based on the same condition within the same node. This feature saves time when you want to make identical transformations on several fields in your dataset. For example, if you want to build a regression model predicting current salary based on beginning salary and previous experience, it might be beneficial to apply a log transformation to all three skewed variables. Rather than add a new Derive node for each transformation, you can apply the same function to all fields at once. Simply select all fields from which to derive a new field and then type the derive expression using the @FIELD function within the field parentheses.

Note: The @FIELD function is an important tool for deriving multiple fields at the same time. It allows you to refer to the contents of the current field or fields without specifying the exact field name. For instance, a CLEM expression used to apply a log transformation to multiple fields is log(@FIELD).

The following options are added to the dialog box when you select Multiple mode:

Derive from. Use the Field Chooser to select fields from which to derive new fields. One output field will be generated for each selected field. Note: Selected fields do not need to be the same storage type; however, the Derive operation will fail if the condition is not valid for all fields.

Field name extension. Type the extension that you would like added to the new field name(s). For example, for a new field containing the log of Current Salary, you could add the extension log_ to the field name, producing log_Current Salary. Use the radio buttons to choose whether to add the extension as a prefix (at the beginning) or as a suffix (at the end) of the field name. The default name is DeriveN, where N is the number of Derive nodes that you have created thus far during the current session.

As in the single-mode Derive node, you now need to create an expression to use for deriving a new field. Depending on the type of Derive operation selected, there are a number of options to create a condition. These options are discussed in subsequent topics. To create an expression, you can simply type in the formula field(s) or use the Expression Builder by clicking the calculator button. Remember to use the @FIELD function when referring to manipulations on multiple fields.