# TOTALQTD

The TOTALQTD function evaluates the quarter-to-date value of the measure in the current context. It should be used in conjunction with an aggregate function like SUM or AVERAGE.&#x20;

## Syntax

```javascript
TOTALQTD([measure])
// Returns the quarter-to-date value of the measure for every quarter
```

## Arguments

measure – The measure for which data has to be fetched and aggregated. Required.

## Return Value

Range of data. When used with an aggregation function, it returns a scalar value running-calculated to date, according to the period selected.

## Example

Find below an example in which the quantity is cumulatively summed every quarter-to-date.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FyoWWU4hD59bYRIDlzMFA%2Fimage.png?alt=media&#x26;token=01764a49-0a8e-461e-8071-99ab92bf601e" alt=""><figcaption><p>TOTALQTD</p></figcaption></figure>
