Relative dates filter nulls option adjustment

Hi Team,
I would like to add relative dates filter on the Control panel, It is to give option to user filer based on their preferred range.

  • Initial dashboard view: All records visible (including null values)
  • Filtered view: Only records with valid dates within the selected range. Currently, when I filter with the date range, it includes null values.how to filter out the null value?

Any guidance on handling these date filtering scenarios would be greatly appreciated.

Hey @Li_Yang

Where it says “Includes Nulls”, you can press that drop down and choose “Exclude Nulls”. Did that not help filter the null values?

@duncan ,Thank you for your response. I need to set “Null” as the default option in the filters. Since there are multiple filters in the Control section, users need to view all records by default. While the date range filter is available for users to narrow down results according to their requirements, they would like only see records that fall within their specified date range, excluding any null values.

Hey @Li_Yang

You won’t be able to do this within the filter options, and the best way I can think to do this quickly would be to create another calculation to filter null values. Then create a control filter giving users the option to exclude or include nulls.

Example:

  1. Create calculation: Date is Null = isNull({date_field})
  2. Create parameter/control Exlclude Null Dates with values ‘True’ and ‘False’
  3. Add a filter on Date is Null linked to Exlclude Null Dates to target visuals

Let me know if you run into any errors or issues!

Hi Duncan, Thank you for your response. I attempted to implement your suggested solution but encountered a problem with the “Date is Null” filter and the “Exclude Null Dates” parameter. Specifically, I created an “Exclude Null Dates” parameter with the string data type, but the system doesn’t recognize it when I try to use it with the “Date is Null” filter. I’ve created an analysis to demonstrate this issue. Could you please help me resolve this problem?
TC Details