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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
ZoltanBojtar
Regular Visitor

FIRSTDATE and LASTDATE functions return first and last day of year, not column values

Hi, I have the below table with dates ranging from 2018.04.01 to 2019.04.01 with multiple payments in each month for multiple policies:

kép.png

 

I need a measure that returns the latest date in that column, so I used LASTDATE(Payments[PaymentDate].[Date]), but that returns 2019.12.31, not 2019.04.01. Why could this be? Thanks!

 

1 ACCEPTED SOLUTION

Except that 2019.12.31 is not among the existing values in that column, 2019.04.01 is the last. 😉

A friend of mine helped me out and  LASTDATE(Payments[PaymentDate]) without .date at the end gave me the expected result, thanks!

View solution in original post

3 REPLIES 3
shushivick7
New Member

I had same issue where the FIRSTDATE formula pulled the very first date of its year, rather than the first date within the record...

I fixed with using MIN/MAX instead + not using the .[date] like Zoltan. 

I have no idea why this fixes it but it is fixed...

Ashish_Mathur
Super User
Super User

Read your question once again.  2019.12.31 is definitely > 2019.04.01 so the measure is working fine.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Except that 2019.12.31 is not among the existing values in that column, 2019.04.01 is the last. 😉

A friend of mine helped me out and  LASTDATE(Payments[PaymentDate]) without .date at the end gave me the expected result, thanks!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors