Filtering with the Max() Function

Published: 20 May 2013
Last Modified Date: 15 Jun 2016


When using a calculated field with MAX() in the formula to filter the view, the field may be able to be used on the Filters shelf.


Tableau Desktop


Option 1 (Tableau Desktop version 9.0 and above)

Create a LOD calculation. For instance, to filter for Customers whose most recent purchase was on a specific date:
  1. Select Analysis > Create calculated field....
  2. In Name enter Most Recent Purchase and in Formula enter {FIXED [Customer Name]: Max([Order Date])}.
  3. Click OK.
  4. Ensure that Most Recent Purchase is in the Dimensions pane and not the Measures pane.
  5. Drag Most Recent Purchase to the Filters shelf.
  6. Select Month/Day/Year and select Next.
  7. Select the desired day and select OK.

Option 2 (Tableau Desktop versions previous to 9.0)

Convert the calculated field to Continuous:
  1. Right-click on the field and select Convert to Continuous.
  2. Drag field to the filters shelf.
  3. Use the slider to select the particular day.

Additional Information

  • Tableau Desktop does not support filtering on discrete measures. The field must either be continuous, as in Option 2, or a dimension, as in Option 1.
  • See attached packaged workbook for example of max(date) on the Filters shelf
Did this article resolve the issue?