Search Results

Showing the difference between the values in two columns

With custom expressions you can do just about anything with the columns in your data. The example below shows how you can use custom expressions to calculate the difference between a Sales column and a Cost column to directly show the Profit for different products.

Note: Because custom expressions work on the filtered rows, you will get different results depending on how you filter your values.
The example data looks like this:

One column contains the sales price and another the purchase cost for each product group and month.


  1. On the axis selector for the visualization where you want to show the difference, right-click to show the pop-up menu.
  2. Select Custom expression.
  3. In the Custom expression dialog, modify the expression so it says Sum([Sales])-Sum([Cost]) and click Apply.
    The axis expression is changed to show the difference between the values in the two columns, and it is easier to see which product earned the best profit.

Using a different version of Spotfire?
This help describes the web client version of Spotfire on TIBCO Cloud™. If you're looking for documentation for the installed client or other versions of Spotfire, visit the TIBCO Documentation Portal.

There you can find help for your version of Spotfire Analyst or Spotfire Business Author.