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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
michaelu1
Advocate II
Advocate II

ENDOFYEAR help

I attached a very basic file, I have 2 columns; a property and a purchase date.

 

PBIX File 

 

Why can't I get the end of year date for purchase?

 

Here are screenshots as well:

Data:

michaelu1_0-1712588721976.png

Table:

michaelu1_1-1712588762934.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @HotChilli ,thanks for the quick reply, I'll add further.

Hi @michaelu1 ,

Regarding your question, the ENDOFYEAR function groups your date columns according to the year, and then gets the largest date in it.You need to create a date table that contains the dates of an entire year.

1.Use the following DAX expression to create a table

 

Table = CALENDAR(DATE(1994,1,1),DATE(2025,12,31))

 

2.Use the following DAX expression to create a column in 'Table'

 

Column = ENDOFYEAR('Table'[Date])

 

3.Use the following DAX expression to create a column in Your own table.

 

Column = LOOKUPVALUE('Table'[Column],'Table'[Date],'Tabelle1'[Purchase Date])

 

4.Final output

vzhouwenmsft_0-1712821143620.png

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @HotChilli ,thanks for the quick reply, I'll add further.

Hi @michaelu1 ,

Regarding your question, the ENDOFYEAR function groups your date columns according to the year, and then gets the largest date in it.You need to create a date table that contains the dates of an entire year.

1.Use the following DAX expression to create a table

 

Table = CALENDAR(DATE(1994,1,1),DATE(2025,12,31))

 

2.Use the following DAX expression to create a column in 'Table'

 

Column = ENDOFYEAR('Table'[Date])

 

3.Use the following DAX expression to create a column in Your own table.

 

Column = LOOKUPVALUE('Table'[Column],'Table'[Date],'Tabelle1'[Purchase Date])

 

4.Final output

vzhouwenmsft_0-1712821143620.png

 

@Anonymous That is certainly a solution.

 

I was hoping to avoid adding additional columns to my model.

 

Also, I was planning on using the endofyear in a measure which I'm sure your solution works for.

 

For now the solution that I came up works, but your idea will certainly be helpful for endofmonth scenarios, thank you!

 

michaelu1
Advocate II
Advocate II

In the end I used DATE(YEAR('Table'[Purchase Date]),12,31).

 

However, this isn't an ideal solution as it can't be applied to end of month since the month days end differently..

HotChilli
Super User
Super User

Time intelligence functions (like ENDOFYEAR) need a proper Dates table.  It won't work by passing a date from a Fact table.  In this case, it's looking for the EndOfYear in a list that contains one date (the date on the same row)

Ok, so how do I get the end of year for these dates?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors