Date.IsInNextNWeeks

This function checks if the provided datetime value dateTime falls within the next set number of weeks, based on the current date and time of the system. Keep in mind that if a value falls within the ...

Syntax

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

About

This function checks if the provided datetime value dateTime falls within the next set number of weeks, based on the current date and time of the system. Keep in mind that if a value falls within the current week, the function will return false. dateTime: The date, datetime, or datetimezone value that needs to be examined. weeks: The specified number of weeks to consider.

Explanation

Identify if the week following the present system time falls within the upcoming two weeks. Use Power Query function MDate.IsInNextNWeeks by adding 7 days to the current date and checking if it is within the next 2 weeks. The output will be true.