There's more...

First, to convert this calculation from a column to a measure, simply edit the first line as follows:

VAR __Year = INT(MAX('R03_Years'[Value]))                

Second, returning the number of days in a year requires only a slight modification. Create this additional column in the R03_Years table:

DaysInYear = 
VAR __Year = INT('R03_Years'[Value])
VAR __Div4 = IF(MOD(__Year,4)=0,TRUE(),FALSE())
VAR __Div100 = IF(MOD(__Year,100)=0,TRUE(),FALSE())
VAR __Div400 = IF(MOD(__Year,400)=0,TRUE(),FALSE())
VAR __IsLeapYear =
SWITCH(TRUE(),
__Div4 && NOT(__Div100),TRUE(),
__Div4 && __Div100 && __Div400,TRUE(),
FALSE()
)
RETURN
IF(__IsLeapYear,366,365)