Forum Discussion
topazz11
6 years agoHelper III
Date conversion
Hello, I need help a DAX to get maximum (latest) date as below? There are multiple timestamps on the same date and I need to get a max date from the same date timestamps. Thank you!
- 6 years ago
Try:
Column =VAR __Date = INT([Column1])RETURNDATE(YEAR(__Date),MONTH(__Date),DAY(__Date))Set the display to just the date and not date and time. - 6 years ago
You may use the following DAX to add a calculated column.
Column = VAR d = Table1[Timestamp].[Date] RETURN IF ( RANKX ( FILTER ( Table1, Table1[Timestamp].[Date] = d ), Table1[Timestamp], , DESC ) = 1, Table1[Timestamp] )
amitchandak
6 years agoSuper User
Try one of two can give
max = maxx(filter(table, table[timestamp].date = earlier(table[timestamp]).date ),table[timestamp])
max = maxx(filter(table, table[timestamp].date = earlier(table[timestamp].date) ),table[timestamp])