---
title: "Use the MONTHTODATE Function to Cumulate Daily Metrics Monthly"
slug: "monthtodate-function"
description: "Learn to use the MONTHTODATE function to cumulate values by day and reset totals at the start of each month in Pigment."
updated: 2025-05-30T09:43:24Z
published: 2025-08-22T11:59:25Z
---

> ## 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.

# MONTHTODATE function

## ​​​Description

Cumulates a Metric defined on the Day Time Dimension and resets the cumulation each month.

> Equivalent of: [CUMULATE(Metric, Day, Day.Month](/v1/docs/cumulate-function)

## Syntax

`MONTHTODATE(Metric [, 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 |
| --- | --- |
| `MONTHTODATE('Quantity Sold')` | 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](/v1/docs/cumulate-function), [QUARTERTODATE](/v1/docs/quartertodate-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!

​

<style> p[data-block-id] {font-size:1rem;} ul li p[data-block-id] {margin-bottom: 0;} ul[data-type="taskList"] li div p[data-block-id] {margin-bottom: 0;} ol li p[data-block-id] {margin-bottom: 0;} table tbody th p[data-block-id] { margin-bottom: 0;} blockquote p[data-block-id] {margin-bottom: 0 !important;} &nbsp;p[data-block-id]:empty::after {content: "\00A0";} </style><style> p[data-block-id] {font-size:1rem;} ul li p[data-block-id] {margin-bottom: 0;} ul[data-type="taskList"] li div p[data-block-id] {margin-bottom: 0;} ol li p[data-block-id] {margin-bottom: 0;} table tbody th p[data-block-id] { margin-bottom: 0;} blockquote p[data-block-id] {margin-bottom: 0 !important;} &nbsp;p[data-block-id]:empty::after {content: "\00A0";} </style>
