How to filter the View without filtering the Underlying Data

How to filter the VIEW without filtering the UNDERLYING DATA

Underlying data refers to the big amounts of data, connections, fields, and tables. It can contain the name and information about data sources, including full data. View Data from Tableau allows you to access data directly from the data source and to see the underlying data for different marks or groups of marks.

Tableau Desktop allows you to filter the data you view including the underlying data. If a dimension is put on the Filters option, Tableau will filter both, but filters based on table calculations don’t apply for the underlying data, which is a great functionality.

This is a good method to visualize only data that interests you, hiding the underlying data from the view. If for example, you want to rank the sales by the name of the company and ROI, you can filter only the view without changing the entire data source.  How cool is that?

Filters based on table calculations do not filter out underlying data. A Table Calculation is the last filter applied and it applies the filters after the view has been produced. Instead, the data is hidden from the view, allowing dimension members to be hidden without impacting the data in the view. In order to filter the view without filtering the underlying data, please follow these steps:

Step 1: Connect to data

→ In Tableau Desktop, connect to Sample – Superstore sample data provided by Tableau.

Step 2: Set up the View

→From the Data pane, drag the Order Date dimension to Rows.

→Right-click Order Date on Rows, and then select Month.

→Right-click Order Date on Rows again, and then select Discrete.

→Right-click Order Date on Rows again, and then select Sort.

→In the Sort dialogue box, under Sort Order, select Descending, and then click OK.

→Drag Sales to Text.

→Right-click Sales on Text, and then select Quick Table Calculation > Moving Average.

Step 3: Filter the View

→Select Analysis > Create Calculated Field to create a calculated field.

→In the Calculated Field dialogue box that opens, enter a name for the field. In the example workbook, this field is named Date Lookup Filter.

→In the formula field, create a calculated field similar to the following, and then click OK:
lookup(min(([Order Date])),0)

→Under Measures, right-click Date Lookup Filter, and then select Convert to Continuous.

→Drag Date Lookup Filter from Measures to Filters.

→In the Filter dialogue box that opens, select the desired dates, and then click OK.

If you need to visually see how it’s done, here is the video created by Andreea Chiriac, Data Analyst at btProvider.