TIBCO Cloud™ Spotfire® Web Client User Guide

Comparing the NavigatePeriod() and Parent() methods

The NavigatePeriod() method can replace many of the other node navigation methods.

As an example, see the following comparison of the NavigatePeriod() and Parent() methods illustrated by means of the bar charts below.

The bar chart at the top shows the sum of sales for some fruits and vegetables.



Let us focus on the Bananas. Assume you want to calculate the Bananas contribution to the total sales of fruit, expressed as a percentage. Both of the expressions in the bar charts below return identical results.

The Parent() method



The NavigatePeriod() method



The "Category",0,0 part in the NavigatePeriod() expression corresponds to the Parent level, that is, it tells to navigate one level up to Category in the hierarchy, not to move sideways, and keep the level.