MONTHTODATE cumulates values from a single numeric parameter, within a monthly time range.
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)
Argument | Data Type | Description |
Line item to aggregate | Number | The line item to aggregate in a monthly timeframe. |
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 | |
Sales | 38,621 | 42,609 | 46,458 | 43,779 | 35,211 | 40,943 |
MONTHTODATE (Sales) | 38,621 | 81,230 | 127,688 | 171,467 | 35,211 | 76,154 |
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(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 | |
Stock | 4,188 | 3,543 | 3,967 | 4,297 | 4,024 | 3,827 | 4,216 | 4,388 | 3,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 content regularly to provide the most up-to-date instructions.