KNOWLEDGE BASE

Make Specific Values Always Be Selected In a Filter


Published: 04 Jan 2021
Last Modified Date: 05 Jan 2021

Question

How to ensure that specific values always remain selected in a filter.

Environment

Tableau Desktop

Answer

The following example uses Superstore sample data.
  1. Create the original worksheet to show the ranking of Sales by Sub-Category.
  2. Create a new worksheet For filter to show the quick filter of Sub-Category.
  3. Duplicate the data field Sub-Category that will be used as a filter.
  4. Add Sub-Category (copy) to the filter, and select the values that should be always selected.
  5. Check Exclude and click OK.
  6. Add data field Sub-Category to the filter, select all values, click OK.
  7. Right click Sub-Category in the Filters card, select Show Filter.
  8. Create a new dashboard.
  9. Add worksheet original to the dashboard.
  10. Add worksheet For filter to the dashboard, hide the title of this worksheet.
  11. Put worksheet For filter in a place that won't affect the view.
  12. Right click the Sub-Category filter in the dashboard, select Only Relevant Values.
  13. Right click the Sub-Category filter in the dashboard, select Apply to Worksheets > Selected Worksheets, check original, click OK.
  14. Right click the Sub-Category filter in the dashboard, select Customize, uncheck the Show "All" Value 
    • This is to avoid that the default selected values will be unchecked when "All" is unchecked.
  15. Go to worksheet original, show filter for Sub-Category.
  16. Check all values in Sub-Category.
  17. Uncheck at least one value that does not belongs the default selected values.
    • This is to avoid that the action of uncheck "All" is triggered.
  18. Go to the dashboard, check the values that are unchecked in step 17.
Now all filter values of Sub-Category in the dashboard can be checked/unchecked without affecting the selected values in step 4. 
Did this article resolve the issue?