YEAR Function (DAX)

How does the YEAR function (DAX) work?

The YEAR function returns the year of a date in the range 1900-9999 as a four digit integer.

YEAR Formula Syntax


How do you use the YEAR function?

Dates should be entered by using the DATE function, or other formula or function results. In accepted text representations of a date like March 3, 2007, or Mar-3-2003, you can also enter dates.

Values returned by the functions YEAR, MONTH, and DAY will be Gregorian values regardless of the display format for the date value given. For example, if the display format of the date supplied uses the Hijri calendar, the values returned for the functions YEAR, MONTH, and DAY will be values associated with the equivalent Gregorian date.

Related Blog Posts

Related Support Forum Posts

Calculate Difference This Year vs Last Year in Power BI with DAX
This Year vs Last Year
Current Financial Year

Considerations when using the YEAR function

If the argument is a string it will be translated into a datetime value using the same rules that the DATEVALUE function applies.


Related Video Tutorials

Formula examples using the YEAR function

=YEAR("March 2007") returns 2007.
=YEAR(DATE (2016,9,15)) returns 2016.  

Related DAX Functions

Date and Time Functions

Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide