Hello Alexandra, when you are filtering on "2018", the data in consideration does not have any records for "2017", hence the calculation does not return any value for 2017. You will have to apply an alternate solution without using any filters. Create two calculated fields as below:
1. Current Year value = IF YEAR([Order Date]) = YEAR(TODAY()) THEN [Sales] END
2. Last Year value = IF YEAR([Order Date]) = YEAR(TODAY()) - 1 THEN [Sales] END
Use these calculated fields in the view without keeping the years in the filter. I hope this helps.