Date.IsInCurrentWeek
DateReturns true if the date falls within the current calendar week.
Syntax
Date.IsInCurrentWeek(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 week, false otherwise.
Remarks
Date.IsInCurrentWeek returns true if the input date falls within the same Sunday-to-Saturday week as today (DateTime.LocalNow()). The week boundary always uses Sunday as the first day, consistent with the default behavior of Date.StartOfWeek. There is no parameter to change the first day of the week — if you need Monday-based weeks, build the comparison manually using Date.StartOfWeek(Date.From(DateTime.LocalNow()), Day.Monday).
Like all Date.IsIn* functions, the reference point is DateTime.LocalNow(). In Power BI Service and cloud Dataflows, this is the server's UTC time, not your local timezone. Week boundaries can shift by a day if your local timezone differs significantly from UTC.
This function matches the entire current week including future days. If you need only dates up to today, add and [OrderDate] <= Date.From(DateTime.LocalNow()).
Examples
Example 1: Filter this week's orders
Table.SelectRows(
Sales,
each Date.IsInCurrentWeek([OrderDate])
)OrderID | OrderDate | |
|---|---|---|
| 1 | 41 | 3/5/2026 |
| 2 | 42 | 3/8/2026 |
Example 2: Flag current-week rows
Table.AddColumn(
Sales,
"IsCurrentWeek", each Date.IsInCurrentWeek([OrderDate]), type logical
)OrderID | OrderDate | IsCurrentWeek | |
|---|---|---|---|
| 1 | 40 | 3/1/2026 | FALSE |
| 2 | 41 | 3/5/2026 | TRUE |
| 3 | 42 | 3/8/2026 | TRUE |
Example 3: Build a Monday-based current week filter manually
let
Today = Date.From(DateTime.LocalNow()),
WeekStart = Date.StartOfWeek(Today, Day.Monday),
WeekEnd = Date.EndOfWeek(Today, Day.Monday)
in
Table.SelectRows(
Sales,
each [OrderDate] >= WeekStart and DateTime.From([OrderDate]) <= WeekEnd
)The final output — filters the Sales table to rows where OrderDate falls within the current Monday-to-Sunday week.
OrderID | OrderDate | |
|---|---|---|
| 1 | 41 | 3/5/2026 |
| 2 | 42 | 3/8/2026 |