KNOWLEDGE BASE

How To Change Sort Order Of Month / Year Date Field Filter To Descending


Published: 24 Aug 2021
Last Modified Date: 07 Mar 2023

Question

When you place a date field by selecting Month / Year, such as MY(Order Date), on the filter pane, the sort order of the filter option is always ascending. How to change it to descending order?

Environment

  • Tableau Desktop

Answer

Follow these steps:
  1. Create a calculated field named for example DATETRUNC Order Date and include the following formula:
    DATE(DATETRUNC('month',[Order Date]))
  2. Right-click the  DATETRUNC Order Date > Default Properties > Sort.
  3. Change the sort order to descending.
  4. Place DATETRUNC Order Date on the filter pane, right-click and select Individual Date, then click OK.
User-added image

Additional Information

The sort order of default properties is applied to the individual date levels but not to the month/year level.
Note: This article is specifically about the sort order of the date used in the filter as shown above.
Did this article resolve the issue?