Use the Calculated User Variable Properties dialog box to add or save
a calculated
user variable.
You can create a new calculated variable or save an existing formula as
a calculated variable.
A calculated variable is evaluated as each source row is processed.
The result is then passed to the source query or to other formulas used
in the job that reference the variable name. This saves processing time
compared with having the same formula evaluated multiple times.
To Add A Calculated User Variable
Do one of the following in Workbench to open the Calculated User Variable Properties dialog box:
From the menu:
Click View > User Variables. The Variables dialog box appears.
Click Add Calculated.
From the Target pane:
Right-click a linked field and select Edit Lookup Criteria. The Edit Lookup Criteria for the selected field appears.
Click Edit Lookup Formula. The Edit Formula for the selected field appears.
Click Show User Variables.
Click Add Calculated.
Enter in Variable Name a meaningful name for the variable.
Select from Data Type the variable type. The available data types are: Date,
DateTime, Number, String, and Time.
Enter the value or formula for this variable into
the Value/Formula pane or click
Formula Editor to use the Edit
Formula dialog box.
Optionally, enter in Help Text information about the variable.
Click OK
to save. If any required information is missing or if any invalid values were provided, a message appears. Otherwise, the new variable appears under User
Variables in the Variables dialog box.
Saving a Calculated Variable
From the Target pane:
Right-click a linked field and select Edit Lookup Criteria. The Edit Lookup Criteria for the selected field appears.
Click Edit Lookup Formula. The Edit Formula for the selected field appears.
Click Save Calculated Variable.
Insight copies the contents of the formula
editing pane into the Value/Formula
pane of the Calculated User Variable Properties dialog box.
You can make changes to the contents of this pane. Note that the Formula
Editor is not available.