Search code examples
sortingtableau-api

How can I apply a custom sort order to a Tableau quick filter, without sorting manually?


I have a Services quick filter containing the following items:

  • [DEPRECATED] Mowing
  • [DEPRECATED] Plumbing
  • [DEPRECATED] Roofing
  • Appliance Repair
  • Cleaning
  • Electrical

I want the services containing [DEPRECATED] to appear at the end of the list. For example:

  • Appliance Repair
  • Cleaning
  • Electrical
  • [DEPRECATED] Mowing
  • [DEPRECATED] Plumbing
  • [DEPRECATED] Roofing

How can I sort my quick filter so that items containing [DEPRECATED] will appear at the end of the list?


Solution

  • In the data pane in the left hand margin, right click on your discrete dimension (Services) and set the default properties -> sort order as desired.

    You will have to set a manual sort order for the field once (unless you have some calculated field that you use). But you'll only have to set it once in the data pane, and then Tableau will use that ordering whenever you use that field in a viz.

    You still have the option to override the default sort order in any particular worksheet.