--- title: "Use QUARTERTODATE Function to Cumulate Time Based Metrics Quarterly" slug: "quartertodate-function" description: "Learn to use QUARTERTODATE to cumulate Metrics by Day or Month, resetting the total at the start of each quarter." updated: 2025-05-30T09:43:49Z published: 2025-08-22T11:59:25Z canonical: "kb.pigment.com/quartertodate-function" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.pigment.com/llms.txt > Use this file to discover all available pages before exploring further. # QUARTERTODATE function ## ​​​Description Cumulates a Metric defined on a Time Dimension (Day or Month) and resets the cumulation each quarter. > Equivalent of: CUMULATE(Metric, Month, Month.Quarter) or CUMULATE(Metric, Day, Day.Quarter) ## Syntax `QUARTERTODATE(Metric [, Aggregation])` ## Arguments | Argument | Type | Dimensions | Description | | --- | --- | --- | --- | | *Metric* (required) | Number | Time Dimension more granular than Quarter | Number to cumulate. | | *Aggregation* (optional) | Aggregation | | Available values: SUM, AVG, MIN, MAX. By default, the aggregation is SUM. | ## Returns | Type | Dimensions | | --- | --- | | Number | Same Dimensions as argument *Metric* | ## Examples | Formula | Description | | --- | --- | | `QUARTERTODATE('Quantity Sold')` | Cumulates the Metric ‘Quantity Sold’ (each day/month is added to the sum of the previous day/month and reset when the quarter changes). | ## See also Related articles: [CUMULATE](/v1/docs/cumulate-function), [MONTHTODATE](/v1/docs/monthtodate-function) , [YEARTODATE](/v1/docs/yeartodate-function) > [!TIP] > **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! ​