There's no need for a calculation at all. Just drag & drop your Date from the Dimensions shelf to the Filters shelf, Select "# Years" , then click "Next" , then select the 4 years you want to filter and apply.
What I'm trying to do is show a Quick Filter on the page of only the last four years. I don't want the users to be able to expand it to all years and the only Quick Filter I can create shows all years.
Oh, ok. I understand now.
- Right click on your Date dimension, click Duplicate.
- Drag your DUPLICATE date to the filter shelf. Filter the 4 years you want.
- Right click DUPLICATE date and "Add to Context"
- Place your ORIGINAL Date on the filter shelf. You don't need to filter anything here.
- Right-click your ORIGINAL Date and add to Quick Filters.
- Go to your Quick Filter and change to "All Values in Context".
Like many things about Tableau, once it's explained, it's simple!