1. Calculation functions
  2. All functions
  3. Time and date functions
  4. NEXT

The NEXT function evaluates an expression based on the next period in the Time dimension.

For example, you can use this function to compare the performance of the current period against the forecast value for the next period.

Syntax

NEXT(Expression)

Arguments

ArgumentData typeDescription
ExpressionNumber, Boolean, date, time period, list, or textThe expression to return the value from the next period for.

The NEXT function returns a result of the same data type as the Expression argument (unless the expression resolves to a different data type).

Syntax example

NEXT(Revenue)

This formula returns the value from the next period for each value of the Revenue line item.

Additional information

Values outside of the line item time range

If the NEXT function returns a value from outside of a line item’s time range, it uses a default value. If the line item has a data type of:

  • number, NEXT returns a value of 0.
  • Boolean, NEXT returns a value of FALSE.
  • text, date, or time period, NEXT returns a value of BLANK.

Constraints

  • If the Expression argument has a data type of list or time period, and does not resolve to a different data type, the result line item must have the same data type.
  • The result line item you use the NEXT function in must have Time as a dimension.

Related Anaplan functions

Examples

Forecast profit change by month


Jan 21Feb 21Mar 21Apr 21
Net Profit215,770221,123223,495220,129

Forecast Profit Change

NEXT(Net Profit) - Net Profit

5,3532,372-3,366220,129

In this example, an income statement module has line items on rows and time on columns. The Net Profit line item shows the net profit for a business.

In this model, the Actual version changes to Forecast in Apr 21, as Switchover is enabled in Model Settings > Versions. The Forecast value for Apr 21 uses a formula to calculate a forecast based on an average of the values for the past three months. As the current period changes, this formula calculates a forecast profit for the next period.

The formula in the Forecast Profit Change line item uses the NEXT function to retrieve the value of Net Profit from the next period. The Net Profit for the current period is subtracted from the Net Profit for the next period to calculate the change in profit from one month to another. This includes the Forecast value for Apr 21, which can be used to plan ahead. As there is no value for May 21 yet, the final value of the Forecast Profit Change line item is the value of the Net Profit line item for Apr 21.

Disclaimer

We may update our documentation occasionally, but will only do so in a way that does not negatively affect the features and functionality of the Anaplan service.