Search Results

PreviousPeriod()

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 PreviousPeriod(), which references the previous 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 PreviousPeriod() method is exemplified below.



Example

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

The bar chart shows sales for a three-year period. The sales figures fluctuate, and it is hard to distinguish where dips occur.



To highlight months with dips compared to the previous month, you can apply the following expression on the value axis:



The expression calculates the differences month by month. If the sales figures have decreased compared to the month before, the bars get negative values. Now it easy to identify, for example, that the deepest dip occurred from September to October, 2017.


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.