• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Data Stories
    • Power BI Stories
    • 1 dataset, 100 matplotlib visualizations
  • Learning Portal
    • Download Center
    • 25 Days Challenge
    • DAX Glossary
    • Power BI
    • Power BI by Topic
    • Python
    • 1 dataset, 100 matplotlib visualizations
  • Courses
    • Power BI Mini Master Class 1: Using a REST API as a data source
    • Power BI Master Class 1: COVID Tracker
    • Introduction to Power BI – FREE Online course
    • M Language + Power Query Course Bundle
    • Power Query Online Training [updated 2022]
    • M Language Online Course: The unofficial and Practical Reference Guide [updated 2025]
    • My Courses
  • Shop
    • Courses
    • Master Classes
    • Template Apps
    • JSON Themes
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Search
  • Contact
You are here: Home / CM Tooltip Glossary Pro+ / EOMONTH

EOMONTH

posted on January 31, 2019

« Back to Glossary Index

Syntax

EOMONTH(<datetime>)

Tutorial with example

I am working on a calculation that requires to count the months remaining on the year for a fiscal calendar and I am sharing some possible solutions with you. As always, there is more that one way to Rome, so feel free to share your alternative solutions! Keynotes: 1. Calculate current month in standard calendar 2. Wrong way to calculate on fiscal calendar (MONTH; ENDOFMONTH) 3. Calculate remaining months manually 4. Do the calculation grabbing the value on the table.

DAX Fridays! #110: Count remaining months on a fiscal calendar

Download example file:

Download Power BI file: here.

Remarks

In contrast to Microsoft Excel, which stores dates as sequential serial numbers, DAX works with dates in a datetime format. The EOMONTH function can accept dates in other formats, with the following restrictions:

If start_date is not a valid date, EOMONTH returns an error.

If start_date is a numeric value that is not in a datetime format, EOMONTH will convert the number to a date. To avoid unexpected results, convert the number to a datetime format before using the EOMONTH function.

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.

When the date argument is a text representation of the date, the EDATE function uses the locale and date time settings, of the client computer, to understand the text value in order to perform the conversion. If current date time settings represent a date in the format of Month/Day/Year, then the following string “1/8/2009” is interpreted as a datetime value equivalent to January 8th of 2009. However, if the current date time settings represent a date in the format of Day/Month/Year, the same string would be interpreted as a datetime value equivalent to August 1st of 2009.

This DAX function may return different results when used in a model that is deployed and then queried in DirectQuery mode. For more information about semantic differences in DirectQuery mode, see https://go.microsoft.com/fwlink/?LinkId=219171.

 

Was this helpful?
« Back to Index

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer CTA

Join our community of +50,000 professionals

Become a Member

Subscribe to YouTube

About me:

Curbal AB
Badhusgatan 7B
722 15 – Västerås
Sweden

OrgNo: 5569680852 | VAT: SE556968085201

 

Location:

© Copyright 2014-2025 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In