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.

MONTHTODATE(Line item to aggregate)

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

In Polaris, you can use the MONTHTODATE function with line items with a time scale of Month. In the Classic Engine, you cannot.

In Polaris, you cannot use MONTHTODATE in formulas of line items with a formula summary method. In the Classic Engine, you can.

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
  • 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.

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