TIBCO Cloud™ Spotfire® Web Client User Guide

Next()

You use the Next() navigation method in an expression, when you want to reference the next node within the same level of the hierarchy.

This is exemplified below.



If the value following the current node is not available (such as the Q3, 2019 value above), the method looks for the very next, not missing, value (in this case Q4, 2019).

The method is commonly used to calculate differences, for example, changes in the current quarter over the following quarter as illustrated above.

Example

Note: The expression in the example assumes that in-memory data is used.

The data table lists weekly measured weights for a newborn child, and the weights are shown in a bar chart.



Assume you are interested in the child's weekly growth. Then you can apply the following expression on the value axis:



The expression calculates the differences week by week, that is, the value of each bar is calculated by subtracting the value from the value of the following the bar. The bar furthest to the right is dropped, because there is no following value to reference.

The same example is used in the Previous() topic. Depending on the method used, the resulting bars are presented differently.