How to Insert a Calculated Column


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.

  1. Select Insert > Calculated Column....

  2. If you have more than one data table in the document, select the Data table to work on.

  3. Specify a suitable expression by either typing it directly into the Expression text field, or by selecting columns, properties and functions from the list.
    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. For details on the syntax to use when adding properties, see Properties in Expressions.

  4. Verify that the result seems reasonable by looking at the Sample result field.

    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.

  5. If desired, you can change the Formatting of the new column.

  6. Type a Column name for the new column.

  7. Click OK.

    Response: The expression is now evaluated for each row in the data table and a new column is created. A filter will appear with the name of the new column you created.

Tip: If you have previously created a suitable expression, you may select it from the Recent expressions list and click the Insert button.

  1. Right-click on a column selector on an axis, in a Visualization Properties dialog, or in the Legend, to display the menu.

  2. Select Custom Expression....

    Comment: See How to Insert a Custom Expression for more information.

See also:

What is a Calculated Column?

Details on Insert Calculated Column

Details on Custom Expression