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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kbturk
Regular Visitor

Dax ENDOFYEAR doesn't always end on last day of year, even when hardcoded.

Hi!

 

I just started using the ENDOFYEAR function in powerbi desktop and I noticed that ENDOFYEAR will only return the last date in a date set instead of the absolute last date of a given year. Is this intentional or an error in ENDOFYEAR? If it's intentional, it isn't clear in the documentation on the site.

 

Screenshot 2025-04-29 170310.png

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @kbturk 

 

ENDOFYEAR does not create dates. It returns the latest date in the current context that is in the same year as the given date, not necessarily December 31st. It relies on the available values in your date column and any filters applied. Try this instead

DATE ( YEAR ( 'table'[date] ), 12, 31 )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
v-kathullac
Community Support
Community Support

Hi @kbturk ,

we would like to follow up to see if the solution provided by the super users resolved your issue. Please let us know if you need any further assistance.

If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.


Regards,

Chaithanya.

danextian
Super User
Super User

Hi @kbturk 

 

ENDOFYEAR does not create dates. It returns the latest date in the current context that is in the same year as the given date, not necessarily December 31st. It relies on the available values in your date column and any filters applied. Try this instead

DATE ( YEAR ( 'table'[date] ), 12, 31 )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vicky_
Super User
Super User

Yeah unfortunately, it is intentional. I normally check Dax.guide (by the SQLBI people) - https://dax.guide/endofyear/

The docs here do clearly state that the Date Table needs a full year - 

vicky__0-1745966512763.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.