Option 1:
ifdatediff('year', [Order Date], [date]) =0 and
month([Order Date]) <= month([date]) and
date( [Order Date]) <= date([date]) then [Sales]
end
Here date is the parameter
Option 2:
if [Order Date] <= [date]
and DATEPART('year',DATEADD('month',12,[Order Date])) = DATEPART('year',DATEADD('month',12,[date]))
then [Sales]
end
Option 3:
sum(if year([Order Date]) = year([dateinput]) and [Order Date] <= [date] then [Sales] END)