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)
|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.
- The source Time Scale must be Day.
- WEEKTODATE cannot be used if Calendar Type is Months/Quarters/Years.
Calculation engine functionality differences
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.
Related Anaplan functions
In the following example, WEEKTODATE is used to aggregate revenue for each day of the week.
|28 Mar 21||29 Mar 21||30 Mar 21||31 Mar 21||1 Apr 21||2 Apr 21||3 Apr 21|