KNOWLEDGE BASE

Filtering View to Show Only Max Date Value for Each Category


Published: 08 Apr 2014
Last Modified Date: 03 Feb 2017

Question

How to filter a text table to show only the latest date value for different categories.

Environment

Tableau Desktop

Answer

Step 1: Create calculated field

  1. Select Analysis > Create Calculated Field.
  2. In the Calculated Field dialog box, name the calculated field Product Ordered Last.
  3. Enter the formulas as below and click OK:
    {FIXED[Product Name]:MAX([Order Date])}

Step 2: Create the view

  1. Using the Superstore sample data (in the attached workbook), drag "Product Name" name to Rows.
  2. Right-click and drag "Order Date" to Rows and select the discrete value as desired.
  3. Right-click and drag "Product Ordered Last" to Rows and select the discrete value as desired.
    1. Notice that the calculated field will show the last time a product was ordered.
Did this article resolve the issue?