The CURRENTVERSION function returns the value from another line item for the version that is set as Current in a model.
For example, you can use the CURRENTVERSION function to compare data between versions.
Syntax
CURRENTVERSION(Line item)
Arguments
Argument | Data type | Description |
Line item | Number, Boolean, date, time period, list, or text | The line item to return the value from the current version for. |
The CURRENTVERSION function returns a result of the same data type as the Line item argument.
Syntax example
CURRENTVERSION(Net profit)
In this example, the formula returns the value from the current version for the Net profit line item.
Constraints
- You can only use the CURRENTVERSION function if a version is set as Current in Versions in the model settings bar.
- You can only use the CURRENTVERSION function if all line items referenced in a formula use Versions as a dimension.
Examples
In this example, an income statement module has line items on rows, the Products list on columns, and versions on pages. The Budget version displays as a page selector.
The model that contains the module has three versions: Budget, Actual, and Forecast. The Actual version is set as Current.
The formula uses the CURRENTVERSION function to show the difference between budget and actual data for Cost of Goods.
Chocolates | Sours | Taffy | Fudge | |
Cost of Goods | 190,000 | 150,000 | 250,000 | 180,000 |
Cost of Goods (Actual)
| 198,000 | 140,433 | 250,670 | 203,005 |