Description
Cumulates a Metric defined on the Day Time Dimension and resets the cumulation each month.
Equivalent of: CUMULATE(Metric, Day, Day.Month)
Syntax
MONTHTODATE(Metric M, Aggregation])
Arguments
Argument | Type | Dimensions | Description |
---|---|---|---|
Metric (required) | Number | Day Time Dimension | Number to cumulate. |
Aggregation (optional) | Aggregation | Available values: SUM, AVG, MIN, MAX. By default, the aggregation is SUM. |
Returns
Type | Dimensions |
---|---|
Number | Day Time Dimension |
Examples
Formula | Description |
---|---|
| Cumulates the Metric ‘Quantity Sold’ (each day is added to the sum of the previous days and reset when the month changes). |
See also
Related articles: CUMULATE, QUARTERTODATE, YEARTODATE
More of a hands-on learner?
Talk to your Customer Success Manager about downloading the Functions and Modifiers in Pigment Application into your workspace. It includes examples of every formula and modifier in Pigment!
