Date.IsInPreviousMonth

This function checks if the provided datetime value, dateTime, happened in the month before the current date and time on the system. Keep in mind that when a value from the current month is passed to ...

Syntax

Date.IsInPreviousMonth(dateTime as any) as nullable logical

About

This function checks if the provided datetime value, dateTime, happened in the month before the current date and time on the system. Keep in mind that when a value from the current month is passed to this function, it will return false. The input for this function should be a date, datetime, or datetimezone value.

Explanation

Check if the month prior to the system's current time falls in the preceding month. Employ the Power Query function MDate.IsInPreviousMonth(Date.AddMonths(DateTime.FixedLocalNow(), -1)) to obtain the result, which will return "true" if the condition is met.