Date.IsInNextNWeeks Function in Power Query

The Date.IsInNextNWeeks function in Power Query (M language) is used to determine whether a given date occurs within the next n weeks (excluding the current week) based on the current system date and time.

Syntax

Date.IsInNextNWeeks(
    dateTime as any,
    weeks as number
) as nullable logical 

The function has the following parameters:

Return Value

Example: Check if 1st September 2025 falls in the next 2 weeks when today's date is 24th August 2025.

Power Query M

let
    Source = Date.IsInNextNWeeks(#date(2025, 9, 1), 2)
in
    Source   

The output of the above code is logical value true.