Forum Discussion

JavierGold's avatar
JavierGold
Regular Visitor
9 years ago
Solved

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?

 

 

  • Chihiro's avatar
    Chihiro
    9 years ago

    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.

4 Replies

  • Chihiro's avatar
    Chihiro
    Solution Sage

    Try...

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

      • Chihiro's avatar
        Chihiro
        Solution Sage

        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.