Last Modified Date: 03 Jan 2019
Environment
Tableau DesktopAnswer
To hide specific columns without filtering the underlying data, we can filter on LAST(), INDEX(), FIRST(), or RANK() and use table calculations to display the correct values. The below example uses the Sample - Superstore data source.Step One - Create a Calculated Field with LAST()
- Select Analysis > Create Calculated Field to create a calculated field.
- In the Calculated Field dialog box that opens, type a name for the field. In this example, the field is named [Last].
- Type the following into the Formula field, and then click OK: LAST()
Step Two - Create Current Date Filter
- Select Analysis > Create Calculated Field to create a calculated field.
- In the Calculated Field dialog box that opens, type a name for the field. In this example, the field is named [Current Date Filter].
- Type the following into the Formula field, and then click OK: If [Last] = 0 THEN 1 ELSE 0 END
Step Three - Create the View
- Drag [Order Date] to Columns.
- Drag [Category] to Rows.
- Place [Last] on Detail.
- Place [Sales] on Text.
- Right-click SUM(Sales) on the Marks card and select Quick Table Calculation > Percent Difference
- Drag [Current Day Filter] to the Filter shelf.
- In the Filter dialog box that opens, select a range of 1-1.
Additional Information
To view these steps in action, see the video below:Discuss this article... Feedback Forum
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials