KNOWLEDGE BASE

Filtering Based on the Last Date in the Data Source


Published: 27 Feb 2013
Last Modified Date: 21 Nov 2016

Question

How to create a relative date filter based on the last date in the data source rather than the current date.

Environment

Tableau Desktop

Answer

The following example uses the Sample - Superstore data source to create a relative date filter based on the last date.
  1. Drag Order Date from the Dimensions pane to the Filters shelf.
  2. In the Filter Field dialog box, select the desired discrete date part. For example, to display only the latest month, select Month / Year, and then click Next >
  3. In the Filter dialog box, click the Top tab, and then select By Field.
  4. Under By Field, select Top and enter 1.
  5. Then select Order Date and Maximum from the drop-down menus and click OK.
Note: A discrete date must be selected. For more information, see Discrete Date Filters.

Additional Information

When selecting a date part, be sure to include higher levels in the date hierarchy. For example, to filter out all but the latest day, select Month / Day / Year instead of just Days.
Did this article resolve the issue?