Date.IsInNextQuarter Function in Power Query
The Date.IsInNextQuarter function in Power Query returns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the next quarter, as determined by the current date and time on the system.
Syntax
Date.IsInNextQuarter(dateTime as any) as nullable logical
The function has the following parameter:
- dateTime: Specifies a
date
,datetime
, ordatetimezone
value to be evaluated.
Returns
- TRUE if dateTime falls within the next full quarter.
- FALSE otherwise.
How It Works
- A quarter is a 3-month period:
- Q1 → January – March
- Q2 → April – June
- Q3 → July – September
- Q4 → October – December
- The function only checks the next full quarter.
- It excludes the current quarter.
Example: Let’s assume the current date is 3 April 2025.
Power Query M
let Source = Date.IsInNextQuarter(#date(2025, 4, 4)) in Source
The output of the above code is false.
Example: Let’s assume the current date is 3 April 2025.
Power Query M
let Source = Date.IsInNextQuarter(#date(2025, 7, 1)) in Source
The output of the above code is true.
Note: • This function will return false when passed a value that occurs within the current quarter.
• Only considers the very next quarter
• Useful for forecasting and financial planning