FOR NextPeriod

FOR NextPeriod function allows you to compute a metric for a future time period the granularity of which is determined contextually by the most granular date attribute that is defined in the report at hand.

FOR NextPeriod functions similarly as FOR Next function unless the adaptable functions adapt to the context of the report by hand. Even though the metric is defined as FOR NextPeriod(Quarter), for example, the function returns values from the next month, as month is the most granular date attribute in this report.

Syntax

SELECT … FOR NextPeriod(…,…)
SELECT metric FOR NextPeriod( time_attribute )

Examples

SELECT Revenue FOR NextPeriod( Quarter )
SELECT Payment FOR NextPeriod( Quarter , 3)

As was the case for the functions Previous( ) and PreviousPeriod( ), the differences between Next( ) and NextPeriod( ) become most relevant when a report contains a more granular date attribute than is specified within the functions themselves. The chart below demonstrates the differences between Leads FOR Next(Quarter) and Leads FOR NextPeriod(Quarter) in a report broken across a more granular Date attribute.
The Next( ) function strictly follows the date attribute specified within the functions parentheses