Date.IsInPreviousQuarter

This function checks if the specified dateTime falls within the previous quarter based on the current date and time of the system. It should be noted that the function will return false if the input v...

Syntax

Date.IsInPreviousQuarter(dateTime as any) as nullable logical

About

This function checks if the specified dateTime falls within the previous quarter based on the current date and time of the system. It should be noted that the function will return false if the input value belongs to the current quarter. The parameter dateTime represents a date, datetime, or datetimezone value that needs to be analyzed.

Explanation

Find out if the quarter just before the current system time falls within the previous quarter. By utilizing Power Query function MDate.IsInPreviousQuarter, we can check if the date obtained by subtracting one quarter from the current local date and time using Date.AddQuarters(DateTime.FixedLocalNow(), -1) is true.