# 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="/files/S423XIpmrAcn9KR0BbqY" alt=""><figcaption><p>TOTALQTD</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inforiver.com/formula-syntax/time-intelligence-functions/totalqtd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
