You could use YEARTODATE to compare sales from the same period of another year.
Syntax
YEARTODATE(Line item)
Arguments
Argument | Data Type | Description |
Line item to cumulate | Number | The line item to cumulate in a yearly timeframe. |
The YEARTODATE function returns a number.
Syntax example
YEARTODATE(Sales)
Constraints
- The Time Scale of source must be Day, Week, Month, Quarter, or Half-Year.
- This function cannot be used if model Calendar Type is Weeks: General.
Calculation engine functionality differences
In Polaris, you can use the YEARTODATE function with line items with a time scale of Year. In the Classic Engine, you cannot.
In Polaris, you cannot use YEARTODATE in formulas of line items with a formula summary method. In the Classic Engine, you can.
Example
The example below shows YEARTODATE applied to sales, in half year increments.
H1 FY18 | H2 FY18 | H1 FY19 | H2 FY19 | H1 FY20 | H2 FY20 | H1 FY21 | H2 FY21 | |
Sales | 78,545 | 63,239 | 67,883 | 72,045 | 84,671 | 69,229 | 76,532 | 67,807 |
YEARTODATE (Sales) | 78,545 | 141,784 | 67,883 | 139,928 | 84,671 | 153,900 | 76,532 | 144,339 |