The PREVIOUSVERSION function evaluates the given expression using the previous version.
For example, you can use the PREVIOUSVERSION function to make comparisons between data from different versions of a plan.
Syntax
PREVIOUSVERSION(Expression)
Arguments
Argument | Data type | Description |
Expression | Number, Boolean, date, time period, list, or text | The expression to return the value from the previous version for. |
The PREVIOUSVERSION function returns a result of the same format as the Expression argument.
Syntax example
PREVIOUSVERSION(Bonus)
In this example, the formula returns the value from the previous version of the Bonus line item.
Additional information
The order of versions is from top to bottom in Versions in the model settings bar.
For example, if your model's versions are ordered Budget, Actual, and Forecast, the previous version of Actual is Budget.
Constraints
The result cell that you use the PREVIOUSVERSION function in must use Versions as a dimension.
Examples
In this example, an income statement module has line items on rows, time on columns, and versions on pages. The model has three versions: Budget, Actual, and Forecast, in that order. The page selector is set to the Actual version.
The formula in the Budget Cost of Goods line item uses the PREVIOUSVERSION function to retrieve the value of Cost of Goods from the previous version.
Jan 21 | Feb 21 | Mar 21 | |
Cost of Goods | 198,734 | 236,761 | 200,459 |
Goods Sold | 456,987 | 498,705 | 460,983 |
Budget Cost of Goods
| 200,000 | 245,000 | 205,000 |