Date.IsInCurrentMonth

Date

Returns true if the date falls within the current calendar month.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Date.IsInCurrentMonth(dateTime as any) as logical

Parameters

NameTypeRequiredDescription
dateTimeanyYesA 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
    Result
Applied Steps

Keeps the orders dated in March 2026, including order 43 later in the month.

OrderID
OrderDate
1403/1/2026
2413/7/2026
3423/8/2026
4433/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
    Result
Applied Steps

Adds IsCurrentMonth, which is true only for the March 2026 orders.

OrderID
OrderDate
IsCurrentMonth
1382/20/2026FALSE
2392/27/2026FALSE
3403/1/2026TRUE
4413/7/2026TRUE
5423/8/2026TRUE
6433/21/2026TRUE
7444/2/2026FALSE

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
    Result
Applied Steps

Keeps March 2026 orders dated on or before Today, so order 43 (March 21) is dropped.

OrderID
OrderDate
1403/1/2026
2413/7/2026
3423/8/2026

Compatibility

✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks
Contributors
kyleamueller