TIBCO Spotfire supports two different types of expressions: Insert Calculated Column, which creates a new column in the data table, and Custom Expression, which is used to dynamically modify the expression used on an axis or to define a setting. Both types of expressions are created with a similar user interface, but custom expressions can also be typed directly into the column selector.
Tip: For simple expressions it is often faster to type expressions directly in the expanded column selector. If the expression is longer and involves lots of properties and functions, the Custom Expression dialog can provide more help, as described below.
To create a custom expression:
Right-click on a column selector on an axis, in a Visualization Properties dialog, or in the Legend, to display the pop-up menu.
Comment: You can also create custom expressions for rules and reference lines, etc. See Custom Expressions for Coloring,Details on Custom Expression for Subset, Details on Limit Data Using Expression, Details on Horizontal/Vertical Line, Details on Curve Draw, or Details on Curve from Data Table for more information.
Select Custom Expression....
Response: The Custom Expression dialog is displayed.
Specify a suitable expression
by either typing it directly into the Expression
text field, or by selecting columns, properties and functions from
the list and clicking the corresponding Insert button.
An example of an expression could be: [Exports m$]/[Population].
Comment: You can always modify the expression by editing the text in the Expression field using cut-and-paste, or by typing text. For a detailed description of the expression language, see General Syntax and other topics under Expression Language in the Insert Calculated Column chapter. For details on the syntax to use when adding properties, see Properties in Expressions.
Type a Display name for the expression.
Click OK.
Comment: If an error message is shown, there is a problem with the expression. Go back and modify the expression until the desired result is achieved.
Response: The expression is used on the specified axis or setting.
Tip: If you have previously created a suitable expression, you may select it from the Recent expressions list and click the Insert button.
To reach the Insert Calculated Column dialog:
Select Insert > Calculated Column....
Comment: See How to Insert a Calculated Column for more information.
See also:
Custom Expressions Introduction