YEAR DAX Function (Date and Time)
Returns the year of a date as a four digit integer.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| Date |
A date in datetime format. |
Return values
An integer in the range 1900-9999.
Remarks
If the argument is a string, it is translated into a datetime value using the same rules applied by the DATEVALUE function.
» 6 related functions
Examples
-- Extract date parts from a date
EVALUATE
ADDCOLUMNS (
SAMPLE ( 10, VALUES ( 'Date'[Date] ), 'Date'[Date], ASC ),
"Year", YEAR ( 'Date'[Date] ),
"Quarter", QUARTER ( 'Date'[Date] ),
"Month", MONTH ( 'Date'[Date] ),
"Day", DAY ( 'Date'[Date] )
)
ORDER BY 'Date'[Date]
| Date | Year | Quarter | Month | Day |
|---|---|---|---|---|
| 2005-01-01 | 2,005 | 1 | 1 | 1 |
| 2005-10-12 | 2,005 | 4 | 10 | 12 |
| 2006-07-23 | 2,006 | 3 | 7 | 23 |
| 2007-05-03 | 2,007 | 2 | 5 | 3 |
| 2008-02-11 | 2,008 | 1 | 2 | 11 |
| 2008-11-20 | 2,008 | 4 | 11 | 20 |
| 2009-08-31 | 2,009 | 3 | 8 | 31 |
| 2010-06-11 | 2,010 | 2 | 6 | 11 |
| 2011-03-22 | 2,011 | 1 | 3 | 22 |
| 2011-12-31 | 2,011 | 4 | 12 | 31 |
Related articles
Learn more about YEAR in the following articles:
-
DAX limitations with inactive relationships and row-level security (RLS)
When you apply row-level security to a semantic model, there are limitations in using the USERELATIONSHIP function. This article shows the issues, provides a workaround, and its restrictions. » Read more
-
Using weekly calendars in Power BI
This article describes why week-based calendars (like 4-4-5) are important for specific industries and how to use them effectively in Power BI. » Read more
Related functions
Other related functions are:
Last update: Oct 28, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/year-function-dax