Date.IsInNextNQuarters Function in Power Query

The Date.IsInNextNQuarters function in Power Query indicates whether the given datetime value dateTime occurs during the next N full quarters, as determined by the current date and time on the system.

Syntax

Date.IsInNextNQuarters(
    dateTime as any,
    quarters as number
) as nullable logical

The function has the following parameters:

Returns

How It Works

Example: Let’s assume the current date is 3 April 2025. Let’s check whether the given date lies in the next two quarters.

Power Query M

let
    Source = Date.IsInNextNQuarters(#date(2025, 12, 31), 2)
in
    Source   

The output of the above code is true.

Example: Let’s assume the current date is 3 April 2025. Let’s check whether the given date lies in the next two quarters.

Power Query M

let
    Source = Date.IsInNextNQuarters(#date(2026, 1, 1), 2)
in
    Source        

The output of the above code is false.

Note: This function will return false when passed a value that occurs within the current quarter.