Do you want to hide Null values or other values from a Tableau filter? The following technique works to hide any values from a filter.
NOTE – this technique removes the values filtered out from the data / worksheet. Also, if using the Context filter, be aware of the affects that has on any FIXED LOD calculations.
Follow these steps:
1. Duplicate the filter field. For this technique we need a copy of the field.
2. Put the duplicate field to the filter shelf. Next select the values you want to hide – i.e. Null – and click exclude on the right of the filter box.
3. Put the original filter field to the filters shelf – there should be the original and the copy on the filters shelf
4. Show the original filter
5. Now there are two choices:
- Add the copy field to context (right click on the pill to see this option). Set the quick filter pill, the original, to show values in context.
- Leave the copy field out of context. Set the quick filter pill to show only relevant values.
Sometimes the data with the Null values is needed in the worksheet data. For example perhaps you want to sum total sales including those where the country is unknown. Therefore, to sum the correct total, the numbers can’t be excluded. In which case either leaving them as Null or renaming the Null values to something else is preferable. Usually the IFNULL formula would be used to rename Null values in Tableau.
It is far simpler to remove the All from a quickfilter. See the Customise option of the quick filter settings.