Date.IsInCurrentDay
DateReturns true if the date is today (local time).
Syntax
Date.IsInCurrentDay(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 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])
)OrderID | OrderDate | |
|---|---|---|
| 1 | 42 | 3/8/2026 |
Example 2: Flag today's rows with a boolean column
Table.AddColumn(
Sales,
"IsToday", each Date.IsInCurrentDay([OrderDate]), type logical
)OrderID | OrderDate | IsToday | |
|---|---|---|---|
| 1 | 41 | 3/7/2026 | FALSE |
| 2 | 42 | 3/8/2026 | TRUE |
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
)OrderID | OrderDate | TodayOrYesterday | |
|---|---|---|---|
| 1 | 40 | 3/6/2026 | FALSE |
| 2 | 41 | 3/7/2026 | TRUE |
| 3 | 42 | 3/8/2026 | TRUE |