Forum Discussion

Mirithu's avatar
Mirithu
Icon for Helper II rankHelper II
4 years ago
Solved

Get Most Recent Date and Amount

Hello, I am trying to write a DAX measure that will give me the most recent date and the corresponding values for that date from a data set below: Date Name Amount 06/09/2021 An Other 589...
  • amitchandak's avatar
    4 years ago

    Mirithu , try a measure like

     

    count Measure =
    VAR __id = MAX ('Table'[Name] )
    VAR __date = CALCULATE ( MAX('Table'[DAte] ), ALLSELECTED ('Table' ), 'Table'[Name] = __id )
    CALCULATE ( sum ('Table'[Amount] ), VALUES ('Table'[Name] ),'Table'[Name] = __id,'Table'[DAte] = __date )