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

YEAR (
<date>
)

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
MINUTE

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.