Welcome to the QuickSight community!
Can you please try the following approach, you can create a calculated field to keep only data for this year and last year. This approach ensures that your pivot table only shows the current year’s data compared to the previous year without pulling in data from earlier years.
Example : (Syntax may little vary - replace the date field from your dataset)
ifelse(extract('YYYY', {date_field}) = extract('YYYY', now())
OR extract('YYYY', {date_field}) = extract('YYYY', now()) - 1,
'Valid', 'Ignore')
Please refer the below QuickSight documentation and community post this might be helpful for you.
Hope this helps!