1
votes

I have a sliding date range filter that is tied to a text table in Tableau. The text table shows addresses and lease expiration dates but some of the dates are blank and therefore show as NULL. When I use the sliding date range filter, the NULL data still shows. The picture below has the filter currently set to Jan 2020 - Sep 2040, yet the NULLs are still showing.

enter image description here

I do not want to completely remove the NULL data from the text table, only when the date filter is applied. In the edit Filter option, there is a button to 'Include Null Values'. If I unselect it, then the NULLs are removed from the text table.

enter image description here

How do I keep the NULLS in the text table and only remove them when the date slider is used?

1

1 Answers

1
votes

Your problem highlights a genuine need. While, it seems to me, that there is no direct solution to your problem, still you can do one the few workarounds.

Consider the following sample data

enter image description here

Workaround-1 create a new calculated field NULL dates with calculation as

ISNULL([DATE])

Now include this field (T/F) in the filter along with date range filter (with NULL values included indeed). The two filters simultaneously can do your job

enter image description here

Workaround-2 create a new date field wherein the null can either be shifted to just above or below the max/min of all the dates available. Use this calculation-

IF ISNULL([Date]) = TRUE
then DATEADD('day', 1, {Max([Date])}) ELSE [Date] END

This will shift your null values to either end of the filter and whenever you'll filter that slider the dates will be filtered out else not.

enter image description here

Still I think first strategy with two filters should be better as it has more flexibility.