I tested your dax formula and it works well. However here is another option that achieve the same goal:
Latest Year =
VAR __country = 'Table'[Country]
VAR __subTable = FILTER( 'Table', 'Table'[Country] = __country )
Return
CALCULATE( MAX( 'Table'[Year] ), __subTable )
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…