Filtering with the Max() Function

Published: 20 May 2013
Last Modified Date: 16 Sep 2020


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


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.


Additional Information

  • See attached packaged workbook for example of max(date) on the Filters shelf

Discuss this article... Feedback Forum
Did this article resolve the issue?