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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JavierGold
Regular Visitor

DAX LastDate Help

I have a dataset table that has multiple columns, however, one column is titled "runtime" which contains a date like: 

 

6/14/2017  11:13:52 AM

 

All of the rows in that table have the same date/time.   I'm trying to create a new measure to show the last runtime of the file that was imported.    When I try this I get the last day of the year:

 

Updated = LASTDATE('2017FinancialData'[Runtime].[Date])

 

I'm obvioulsy not using that function correctly; however, any ideas on the best approach to get it?

 

 

1 ACCEPTED SOLUTION

My bad. You'd need to remove .[Date] part.

 

To get date portion only try using.

=DATEVALUE(MAX('2017FinancialData'[Runtime]))

 

EDIT: LASTDATE function works much the same way.

View solution in original post

4 REPLIES 4
Chihiro
Solution Sage
Solution Sage

Try...

Updated = MAX('2017FinancialData'[Runtime].[Date])

Same result....;-(

My bad. You'd need to remove .[Date] part.

 

To get date portion only try using.

=DATEVALUE(MAX('2017FinancialData'[Runtime]))

 

EDIT: LASTDATE function works much the same way.

Perfect.  Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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