Kpi compared to the previous year

Hello,

I have two fields Val and Date. I want create a KPI with a custom expression.
I want sum(Val) compared to the previous date. I do this Sum([traf_aer_pax], Max(year([periodDate_date]) - 1)) but i get a error: anticipated boolean but found Max function returning aggregation