Date.IsInCurrentDay

Date

Returns true if the date is today (local time).

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

Syntax

Date.IsInCurrentDay(dateTime as any) as logical

Parameters

NameTypeRequiredDescription
dateTimeanyYesA date, datetime, or datetimezone value to test.

Return Value

logicaltrue if the date falls on today's date, false otherwise.

Remarks

Date.IsInCurrentDay compares the date component of the input value against today's date as determined by DateTime.LocalNow(). It returns true if they fall on the same calendar day, regardless of the time component. This function is re-evaluated on each query refresh, making it suitable for dynamic "today" filters in interactive reports.

All Date.IsIn* functions use the local system clock (DateTime.LocalNow) as their reference. In Power BI Service scheduled refreshes or Dataflows running in the cloud, "local" means the server's time zone (typically UTC), not your local machine's time zone. If your data contains date values in a local time zone, this can produce unexpected results — consider using DateTimeZone functions when timezone accuracy is critical.

This function is equivalent to Date.From(dateTime) = Date.From(DateTime.LocalNow()). It only checks the calendar date, not the time. For scenarios where you need today included in a multi-day window, combine this with Date.IsInPreviousNDays using an or expression.

Examples

Example 1: Filter today's orders

Table.SelectRows(
    Sales,
    each Date.IsInCurrentDay([OrderDate])
)
Result
OrderID
OrderDate
1423/8/2026

Example 2: Flag today's rows with a boolean column

Table.AddColumn(
    Sales,
    "IsToday", each Date.IsInCurrentDay([OrderDate]), type logical
)
Result
OrderID
OrderDate
IsToday
1413/7/2026FALSE
2423/8/2026TRUE

Example 3: Combine today and yesterday into a two-day window

Table.AddColumn(
    Sales,
    "TodayOrYesterday",
    each Date.IsInCurrentDay([OrderDate]) or Date.IsInPreviousDay([OrderDate]),
    type logical
)
Result
OrderID
OrderDate
TodayOrYesterday
1403/6/2026FALSE
2413/7/2026TRUE
3423/8/2026TRUE

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks