WEEKTODATE aggregates the daily values within a week from a single numeric parameter. WEEKTODATE resets after the last day of the week.

You could use WEEKTODATE to compare orders received this week with the orders from previous weeks, up to and including the same day of the week. WEEKTODATE resets at each weekly interval.

WEEKTODATE(Line item to aggregate)

ArgumentData TypeDescription
Line item to
Number or numeric line item.The line item to aggregate in a weekly timeframe.

The WEEKTODATE function returns a number-formatted result.


WEEKTODATE below is used to show cumulative sales.

Unit costs130155125142137151122
Packaging 30 40 26 38 41 33 39
Sales110 53 37 72 6793102
  • The source Time Scale must be Day.
  • WEEKTODATE cannot be used if Calendar Type is Months/Quarters/Years.

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

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

In the following example, WEEKTODATE is used to aggregate revenue for each day of the week.

28 Mar 2129 Mar 2130 Mar 2131 Mar 211 Apr 212 Apr 213 Apr 21
Revenue32,50030,80029,050 27,500 31,250 33,400 32,750