TIBCO Cloud™ Spotfire® Web Client User Guide

Shortcuts to frequent custom expressions

Some custom expressions are more commonly used than others, for example, moving average and cumulative sum. Shortcuts to a number of the most common expressions are provided in the list of aggregation methods in the column selector on an axis, so you do not need to type these expressions yourself. Which shortcuts that are available depends on what kind of data you have selected on the axis in question in the visualization.



The entire expressions for the shortcuts as well as the standard aggregation methods can be viewed and edited.
  • In the installed client, this is done in the expanded axis selector:


  • In the web client, right-click the column selector, and select Custom expression:


    The Custom expression dialog will open, where you can view and edit the expression.



The expressions

When you view the expressions for the shortcuts in the Custom expression dialog, you notice that they contain (as you can see in the image above)

To understand how to evaluate the expressions, these concepts need an explanation.

The OVER statement and the node navigation method

The OVER statement is a means to reference different slices of data when using various node navigation methods. When calculating the new value of a certain slice for the method expression in question,
  • the OVER statement tells that slices outside of the current slice should be used when evaluating the expression,
  • and the node navigation method tells which slices to use.

The THEN keyword and the [Value] column

The use of the THEN keyword makes it possible to evaluate an expression on already aggregated data. The part of the expression before the THEN keyword is calculated first.

The temporary column called [Value] represents the result of the entire (already aggregated) expression before the THEN keyword.

Examples of expression shortcuts

What is calculated when applying each of the shortcut expressions in the rectangle above is explained in the following topics. All the topics (except the Top Category topic) use the bar chart below as input.