---
title: QUARTER
description: Learn how to use the QUARTER function to extract and analyze quarter values from dates. Useful for grouping data, year-over-year comparisons.
---
import { Aside, Steps } from '@astrojs/starlight/components';

# QUARTER

The QUARTER function in Infoveave is used to extract the quarter from a given date.

## Applicable to

Calculated Columns

## Return Value

The QUARTER function returns the quarter value as an integer for a given date.

## Remark

* The function is useful for extracting the quarter from dates for analysis, such as grouping data by quarter, performing year-over-year comparisons, and filtering data by quarter.
* The QUARTER function returns “Invalid Date” on null or blank values.

## Syntax

```
QUARTER(<expression>)
```

<br/>

<Aside type="tip">
You can call in the system defined date function start date and end date as `@StartDate` and `@StartDate` respectively.
</Aside>

<br/>

## QUARTER in Calculated Columns

<br/>

Steps to Use

<Steps>
1. Write the QUARTER function. For instance ```QUARTER(<expression>)```
2. Replace `<expression>` with the start period. You can also call in `@StartDate` and `@EndDate` function.
3. To learn how to add calculated columns in Infoveave, visit the section [Calculated Columns](/studio-v8/datasources/calculated-columns-datasource/).
3. To learn how to configure an Expression in Infoveave, visit [Configure Expression](/insights-v8/advanced-configuration/#configuring-expressions).
</Steps>

<br/>

**Example**

Suppose you want to create a column that returns the quarter value based on the column SALES DATE, you can use the QUARTER function as follows 

```
QUARTER (DATEVALUE(VALUE([Sales Date])))
```

<br/>

<Aside type="tip">
When using the DATE function within WEEKDAY, you do not need to include the function DATEVALUE in your formula. 
</Aside>

For example

```
QUARTER ((DATE(2024, 05, 01))) 
```

will return 2.

<br/>


