Date.IsInNextNQuarters
DateReturns true if the date falls within the next N calendar quarters.
Syntax
Date.IsInNextNQuarters(dateTime as any, quarters as number) as logicalParameters
| Name | Type | Required | Description |
|---|---|---|---|
dateTime | any | Yes | A date, datetime, or datetimezone value to test. |
quarters | number | Yes | The number of quarters ahead to include. Must be a positive integer. |
Return Value
logical — true if the date falls within the next N quarters after the current quarter, false otherwise.
Remarks
Date.IsInNextNQuarters returns true if the input date falls within the next N complete calendar quarters after the current quarter. The current quarter itself is not included; use Date.IsInCurrentQuarter to also match the current quarter. The function is re-evaluated on each query refresh.
For example, if today is in Q1 and quarters = 2, it matches any date in Q2 or Q3. Quarters are always standard calendar quarters (Q1: Jan–Mar, Q2: Apr–Jun, Q3: Jul–Sep, Q4: Oct–Dec) — there is no support for custom fiscal quarters.
Use this function in pipeline reports to see deals closing in the next one or two quarters, or in capacity planning to highlight deliverables due within the next few quarters.
Examples
Example 1: Find orders due in the next 2 quarters
Table.SelectRows(
Sales,
each Date.IsInNextNQuarters([OrderDate], 2)
)OrderID | CustomerName | OrderDate | |
|---|---|---|---|
| 1 | 43 | Alice | 4/10/2026 |
| 2 | 44 | Bob | 5/18/2026 |
| 3 | 45 | Charlie | 6/25/2026 |
| 4 | 46 | Diana | 8/1/2026 |
Example 2: Flag orders ending in the next 4 quarters
Table.AddColumn(
Sales,
"DueNextYear", each Date.IsInNextNQuarters([OrderDate], 4), type logical
)OrderID | OrderDate | DueNextYear | |
|---|---|---|---|
| 1 | 42 | 3/8/2026 | FALSE |
| 2 | 43 | 4/10/2026 | TRUE |
| 3 | 50 | 2/28/2027 | FALSE |
Example 3: Combine current and next quarter for a half-year view
Table.SelectRows(
Sales,
each Date.IsInCurrentQuarter([OrderDate]) or Date.IsInNextNQuarters([OrderDate], 2)
)OrderID | CustomerName | OrderDate | |
|---|---|---|---|
| 1 | 42 | Charlie | 3/8/2026 |
| 2 | 43 | Alice | 4/10/2026 |
| 3 | 44 | Bob | 5/18/2026 |
| 4 | 45 | Diana | 6/25/2026 |