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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Yaa_D
Frequent Visitor

Max date in a column

Hi All, 
I have a date column called FileDate, and I'm trying to get the latest date in that column.

Yaa_D_0-1636537262612.png
I've tries using MAX or LASTDATE in the following ways: 

maxFileDate = LASTDATE(('myTable'[FileDate].[Date])
maxFileDate = MAX('myTable'[FileDate].[Date])
maxFileDate = CALCULATE(MAX('myTable'[FileDate].[Date]), All())

All return 12/31/2021 although the last date in that column is Nov 9th

What am I missing here?
Thanks for the help!

 

 

1 ACCEPTED SOLUTION

@Yaa_D Lose the .[Date] part of your formula and I would use MAX so:

maxFileDate = MAX('myTable'[FileDate])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
VahidDM
Super User
Super User

Hi @Yaa_D 

 

What is your column format, is it Date?

 


Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Yaa_D
Frequent Visitor

Yup, it's Date

Yaa_D_0-1636540941175.png

 

@Yaa_D Lose the .[Date] part of your formula and I would use MAX so:

maxFileDate = MAX('myTable'[FileDate])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hello @Greg_Deckler  , thank you for this tip . I also used it at a similar issue I had and it worked just fine . May I ask what is the implication of using the .[Date] at the end? Thank you, George Giannakis

Perfect. Thank you!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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