Date.IsInCurrentMonth
DateReturns true if the date falls within the current calendar month.
Syntax
Date.IsInCurrentMonth(dateTime as any) as logicalParameters
| Name | Type | Required | Description |
|---|---|---|---|
dateTime | any | Yes | A date, datetime, or datetimezone value to test. |
Return Value
logical — true if the date is in the current month, false otherwise.
Remarks
Date.IsInCurrentMonth returns true if the input date falls within the same year and month as today's date (DateTime.LocalNow()). It matches the entire calendar month from the first to the last day, inclusive — including future dates within the current month. This function is re-evaluated on each query refresh.
Note that this function includes future dates in the current month. If you need only dates up to and including today, use Date.IsInYearToDate restricted to the current month, or add and [OrderDate] <= Date.From(DateTime.LocalNow()) to the filter.
In Power BI Service scheduled refreshes and cloud Dataflows, the "local" time is the server's timezone (usually UTC). If your data dates are in a different timezone, the month boundary may not align with what you expect. This is the same caveat that applies to all Date.IsIn* functions.
The examples below assume today is March 8, 2026, so the current month is March 2026. On a different day, the same code returns different rows.
Examples
Example 1: Filter this month's orders
let
Orders = #table(
type table [OrderID = number, OrderDate = date],
{
{38, #date(2026, 2, 20)},
{39, #date(2026, 2, 27)},
{40, #date(2026, 3, 1)},
{41, #date(2026, 3, 7)},
{42, #date(2026, 3, 8)},
{43, #date(2026, 3, 21)},
{44, #date(2026, 4, 2)}
}
),
Result = Table.SelectRows(Orders, each Date.IsInCurrentMonth([OrderDate]))
in
ResultKeeps the orders dated in March 2026, including order 43 later in the month.
OrderID | OrderDate | |
|---|---|---|
| 1 | 40 | 3/1/2026 |
| 2 | 41 | 3/7/2026 |
| 3 | 42 | 3/8/2026 |
| 4 | 43 | 3/21/2026 |
Example 2: Flag current-month rows
let
Orders = #table(
type table [OrderID = number, OrderDate = date],
{
{38, #date(2026, 2, 20)},
{39, #date(2026, 2, 27)},
{40, #date(2026, 3, 1)},
{41, #date(2026, 3, 7)},
{42, #date(2026, 3, 8)},
{43, #date(2026, 3, 21)},
{44, #date(2026, 4, 2)}
}
),
Result = Table.AddColumn(
Orders,
"IsCurrentMonth", each Date.IsInCurrentMonth([OrderDate]), type logical
)
in
ResultAdds IsCurrentMonth, which is true only for the March 2026 orders.
OrderID | OrderDate | IsCurrentMonth | |
|---|---|---|---|
| 1 | 38 | 2/20/2026 | FALSE |
| 2 | 39 | 2/27/2026 | FALSE |
| 3 | 40 | 3/1/2026 | TRUE |
| 4 | 41 | 3/7/2026 | TRUE |
| 5 | 42 | 3/8/2026 | TRUE |
| 6 | 43 | 3/21/2026 | TRUE |
| 7 | 44 | 4/2/2026 | FALSE |
Example 3: Filter month-to-date orders only (excluding future dates this month)
let
Today = Date.From(DateTime.LocalNow()),
Orders = #table(
type table [OrderID = number, OrderDate = date],
{
{38, #date(2026, 2, 20)},
{39, #date(2026, 2, 27)},
{40, #date(2026, 3, 1)},
{41, #date(2026, 3, 7)},
{42, #date(2026, 3, 8)},
{43, #date(2026, 3, 21)},
{44, #date(2026, 4, 2)}
}
),
Result = Table.SelectRows(
Orders,
each Date.IsInCurrentMonth([OrderDate]) and [OrderDate] <= Today
)
in
ResultKeeps March 2026 orders dated on or before Today, so order 43 (March 21) is dropped.
OrderID | OrderDate | |
|---|---|---|
| 1 | 40 | 3/1/2026 |
| 2 | 41 | 3/7/2026 |
| 3 | 42 | 3/8/2026 |