Date.IsInCurrentYear
DateReturns true if the date falls within the current calendar year.
Syntax
Date.IsInCurrentYear(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 year, false otherwise.
Remarks
Date.IsInCurrentYear returns true if the input date falls anywhere within the same calendar year as today (DateTime.LocalNow()), from January 1 through December 31. The function is re-evaluated on each query refresh. To limit results to dates up to and including today, use Date.IsInYearToDate instead.
This is the broadest of the Date.IsInCurrent* family and includes all future dates within the current year. This is useful for full-year budget vs. actual comparisons where both historical and planned dates are in the same table.
Like all Date.IsIn* functions, the reference year is determined by DateTime.LocalNow(). In cloud refresh environments (Power BI Service, Dataflows), this is based on the server's UTC clock. At year boundaries near midnight UTC, the "current year" could differ between your local environment and the cloud refresh.
Examples
Example 1: Filter this year's orders
Table.SelectRows(
Sales,
each Date.IsInCurrentYear([OrderDate])
)OrderID | OrderDate | |
|---|---|---|
| 1 | 38 | 1/10/2026 |
| 2 | 40 | 2/20/2026 |
| 3 | 42 | 3/8/2026 |
Example 2: Flag current-year rows
Table.AddColumn(
Sales,
"IsCurrentYear", each Date.IsInCurrentYear([OrderDate]), type logical
)OrderID | OrderDate | IsCurrentYear | |
|---|---|---|---|
| 1 | 36 | 11/15/2025 | FALSE |
| 2 | 38 | 1/10/2026 | TRUE |
| 3 | 42 | 3/8/2026 | TRUE |
Example 3: Compare current year vs. year-to-date
Table.AddColumn(
Table.AddColumn(
Sales,
"IsCurrentYear", each Date.IsInCurrentYear([OrderDate]), type logical
),
"IsYTD", each Date.IsInYearToDate([OrderDate]), type logical
)OrderID | OrderDate | IsCurrentYear | IsYTD | |
|---|---|---|---|---|
| 1 | 36 | 11/15/2025 | FALSE | FALSE |
| 2 | 38 | 1/10/2026 | TRUE | TRUE |
| 3 | 45 | 6/15/2026 | TRUE | FALSE |