MONTHTODATE cumulates values from a single numeric parameter, within a monthly time range.

You could use MONTHTODATE to compare orders received this month with the orders from previous months, up to and including the same day. MONTHTODATE resets at each monthly start date, based on Calendar Type.

Syntax

MONTHTODATE(Line item to aggregate)

Arguments

ArgumentData TypeDescription
Line item to
aggregate 
Number The line item to aggregate in a monthly timeframe.

Syntax example

MONTHTODATE(Sales)

In the example below, MONTHTODATE cumulates sales for each month.
At week five, the start of the next month, MONTHTODATE resets.


Week 1
FY21
Week 2
FY21
Week 3
FY21
Week 4
FY21
Week 5
FY21
Week 6
FY21
Sales38,621 42,60946,45843,779 35,21140,943
MONTHTODATE
(Sales)
38,62181,230127,688171,46735,21176,154

Constraints

  • The line item argument in the MONTHTODATE function must have a Time Scale of Day or Week.
  • MONTHTODATE cannot be used if the model has a Calendar Type of Weeks: General.

Calculation engine functionality differences

In Polaris, you can use the MONTHTODATE function with line items that have a matching time scale. For example, you can use MONTHTODATE with a line item with a time scale of Month.

In the Classic Engine, you cannot.

Related Anaplan functions

Example

MONTHTODATE(Stock)


Week 1
FY22
Week 2
FY22
Week 3
FY22
Week 4
FY22
Week 5
FY22
Week 6
FY22
Week 7
FY22
Week 8
FY22
Week 9
FY22
Stock4,188 3,5433,9674,297 4,0243,8274,2164,3883,635
MONTHTODATE
(Stock)

4,188

7,731

11,698

15,995

4,024

7,851

12,067

16,455

3,635

Disclaimer

We update Anapedia regularly to provide the most up-to-date instructions.