Spotfire® User Guide

Adding a calculated column

Calculated columns allow you to combine or recalculate one or more columns with aggregation measures and/or mathematical expressions. This way, you can create new columns with more information based on your available data. They can be added from the Data menu, from the Data in analysis flyout, or from the Data canvas.

About this task

For generic information about Spotfire expressions, see Making your own calculations and Expression language details.

Procedure

  1. On the menu bar, click Data > Add calculated column.
    Tip: You can also click Add at the bottom of the Data in analysis flyout, or click the plus sign on the final data table node in the Data canvas, and select Add calculated column.
  2. In the Add calculated column dialog, type the expression of interest.
    For more information about which types of methods you can use, see Functions and Operators. You can also add more advanced expressions using different types of properties.
    Tip: When you start typing, autocomplete functionality will suggest names of functions or column names, matching those characters you have written. Click a suggestion, and it will be added to the expression.
    Tip: When using the installed client, you can (in many cases) get access to a sample result directly in the dialog, or click Preview to see sample results. Note that if aggregating functions (such as, "Count") are used in the expression, only the first 100 rows will be used in the sample calculation.
  3. Beneath Column name, give the added column a proper name.
  4. Click OK.

Results

The expression is evaluated for each row in the data table and a new column is created. If the Filters panel is shown, a new filter will also show up (if you are working with in-memory data).