# NEXTNMONTH

The NEXTNMONTH function can be used to select data from a given measure, for a specified number of months after the current month. It should be used in conjunction with the SELECT clause and with an aggregate function like SUM or AVERAGE.&#x20;

## Syntax

```javascript
NEXTNMONTH(number_of_months)
```

## Arguments

number\_of\_months – The number of months for which data has to be fetched. Required.

## Return value

Period Range.

## Example

```javascript
NEXTNMONTH(15) 
//Returns data for 15 months before the current month
```

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FIxwQcLQf1Dr0tm9XgJwB%2Fimage.png?alt=media&#x26;token=8f1e2494-e627-4618-8321-d28d2f77c045" alt=""><figcaption><p>NEXTNMONTH</p></figcaption></figure>
