Forum Discussion

pfarahani's avatar
pfarahani
Icon for Helper II rankHelper II
5 years ago
Solved

DAX measure for Max Date

Hello,    I am creating a measure to get the max month and the max year that is in my data. So far I have a working measure that gets the latest month. Can I also add the Year to this? How can I ad...
  • pfarahani's avatar
    pfarahani
    5 years ago

    I think I got it, check this one out:

     

    Latest Date =
    VAR MaxOrder =
    MAX ( 'Dates TEST'[MonthNum] )
    VAR MaxYear =
    MAX('Dates TEST'[Year])
    RETURN
    CALCULATE ( MAX( 'Dates TEST'[Month] ), 'Dates TEST'[MonthNum] = MaxOrder ) & " " & MaxYear