What is the difference between over function "Next" and "NextPeriod"?

What is the difference between over function "Next" and "NextPeriod"?

book

Article ID: KB0082604

calendar_today

Updated On:

Products Versions
Spotfire Analyst All Versions.

Description

The over functions "NEXT" and "NEXTPERIOD" both use the next node on the same level as the current node.If there is no next node, that is, if the current node is the last node for the current level, the resulting subset will not contain any rows.

So what is the difference between these two functions?

Issue/Introduction

What is the difference between over function "Next" and "NextPeriod"?

Resolution

If you have a time hierarchy and you don't have data for one "Month" you will notice a difference between Next and NextPeriod. 

For example if you have "Jan", "Feb" and "Apr" data for 2015 and "Jan", "Feb", "Mar" and "Apr" for 2016 refer to the screen shot below.
User-added image

Next will always use the next value, but NextPeriod will include an empty "Mar" even for 2005 and hence the node "Feb" for 2015 will have value for "NEXT" and no value in node "Feb" -2015 for "NextPeriod".
User-added image


Dxp file attached for reference.

Attachments

What is the difference between over function "Next" and "NextPeriod"? get_app