EOMONTH Function (DAX)

How does the EOMONTH function (DAX) work?

The EOMONTH function (DAX) returns the date of the last day of the month, before or after a given number of months, in datetime format. Using EOMONTH to calculate dates of maturity or due dates which fall on the last day of the month.

EOMONTH Formula Syntax

EOMONTH(
     <start_date>,<months>
)

How do you use the EOMONTH function?

Using EOMONTH to measure the dates of maturity or due dates that fall on the last day of the month.

DAX operates in datetime format with the dates. Dates which are stored in other formats are implicitly converted.

Related Blog Posts

Related Support Forum Posts

Find date of 3rd Thursday of the month
Custom quarter ending on 3rd Friday of quarter’s last month
Current Month vs Previous Month Comparison at Each day level

Considerations when using the EOMONTH function

  • If start_date is not a valid date, EOMONTH returns an error.
  • If start_date plus months yields an invalid date, EOMONTH returns an error. Dates before March 1st of 1900 and after December 31st of 9999 are invalid.
  • DAX EOMONTH function uses the client computer’s locale and date / time settings to recognize the text meaning to make the conversion. For example,
    • If the current date/time settings represent dates in the format of Month/Day/Year, then the string, “1/8/2016” is understood as a datetime value equivalent to 8th January 2016.
    • If the current date/time settings represent dates in the format of Day/Month/Year, the same string would be understood as a datetime value equivalent to 1st August 2016.

The function returns an error if the text representation of the date cannot be correctly converted to a datetime value.

Related Video Tutorials

Formula examples using the EOMONTH function

=EOMONTH (“March 3, 2008”, 1.5)

=EOMONTH( TODAY(), 0 )

= EOMONTH (
    DATE ( 2016, 4, 5),5
)

Related DAX Functions

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.