TIBCO Cloud™ Spotfire® Web Client User Guide

NextPeriod()

Some node navigation methods are especially suited for hierarchies containing periodic data, first and foremost time hierarchies. Time is structured hierarchically by nature (like year, quarter, month) and the time periods are recurrent. Because the nodes in a time hierarchy are obvious, any nodes that miss data can be detected automatically. One of these navigation methods is NextPeriod(), which references the next node within the same level of the hierarchy. When you use this method in an expression, and any nodes are missing data, the expression will return empty values for such nodes.

The NextPeriod() method is exemplified below.



Example

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

In January 2020, the falling ill with the flu is forecasted month by month for the entire year, and the prognosis is presented in the bar chart below.



Assume you want the prognosis to show how the relative falling ill develops from one month to the next. Then you can apply the following expression on the value axis.



For example, looking at the September bar, the prognosis forecasts that the number of people falling sick will double from September to October (that is, the bar shows an increase of 100%). In October and November, the absolute number of people forecasted to fall sick will still increase, but at a lower growth rate.