If you want to reference data that isn't visible in your Tableau worksheet, you're going to need a trick to 'hide' that data rather than filter it out of the worksheet entirely. For example, if you want to calculate year over year growth but only display the latest year, you can't filter the prior year out of your worksheet or Tableau will not be able to reference the prior year values.
Hiding data with a filter in Tableau is an expert trick you should know about. One of the best ways to 'hide' data with a filter is to use a Table Calculation filter. Table Calculations filters are one of the last steps processed in Tableau's order of operations. They are even processed after your standard table calculations (e.g. Percent of Total, Rank, Percent Difference) are computed.