Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Unless you are using fiscal years you can simplify your code.
Written TY =
VAR DtSelected=SELECTEDVALUE(Dates[TRNDATE])
return
Calculate(
Sum('WO 3Years'[Written $ TY]),
'WO 3Years'[DATE]<=DtSelected,
YEAR('WO 3Years'[DATE])=YEAR(DtSelected)
)
This is not working