Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
henry_s
Regular Visitor

ENDOFMONTH function not working as expected

I created a simple date table as follows:

 

 

 

 

DateTable =
DATATABLE(
    "Date", DATETIME, {
        {"14/2/2024"},
        {"15/2/2024"},
        {"16/2/2024"}
    }
)

 

 

 

Then I created a new column using 

 

 

End of Month = ENDOFMONTH(DateTable[Date])

 

 

 

Result

henry_s_0-1707882031804.png

 

I know I can use EOMONTH which works, but am curious why this doesnt? I expect to get 29 February but it seems like its simply picking the maximum date. Or maybe I failed to understand the documentation

 

 

 

1 ACCEPTED SOLUTION
govindarajan_d
Super User
Super User

Hi @henry_s ,

 

You are right.

The EOMONTH is a date function that returns the last date of the month irrespective of what dates are present in the date table. 

The ENDOFMONTH is a time intelligence function that returns last date in the current context which means for the month and year that corresponds to the row. You can think of it like a max function on date column for the year-month combination. 

 

In documentation, you will find EOMONTH under date and time functions, while ENDOFMONTH in time intelligence functions. Time intelligence functions require a date table to operate to their best efficiency while date and time functions don't necessarily need that. 

View solution in original post

2 REPLIES 2
henry_s
Regular Visitor

Understood thanks @govindarajan_d . Makes sense now, the name is quite misleading.

govindarajan_d
Super User
Super User

Hi @henry_s ,

 

You are right.

The EOMONTH is a date function that returns the last date of the month irrespective of what dates are present in the date table. 

The ENDOFMONTH is a time intelligence function that returns last date in the current context which means for the month and year that corresponds to the row. You can think of it like a max function on date column for the year-month combination. 

 

In documentation, you will find EOMONTH under date and time functions, while ENDOFMONTH in time intelligence functions. Time intelligence functions require a date table to operate to their best efficiency while date and time functions don't necessarily need that. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.