Including null values in date filters

In CDP Data Visualization, the date filter enables you to select null values for visualization.

The following steps use a scatter visual, which is built on the dataset Issue Tracker. This dataset includes issues that are created and resolved and also issues that are created but still open. Resolved issues have a timestamp and open issues have a null value.

By default, the visual only displays values with a timestamp. This feature enables you to configure the date filter and display null values in the visuals.

This article includes the following sections:

In this example, we use a dashboard with a scatter visual that plots created and resolved issues.

Follow these steps to create a new dashboard.

  1. Create a new dashboard and name it Issue Completeness.
  2. In the Dashboard Designer, create a Scatter visual based on the dataset Issue Tracker.
  3. Populate the shelves from the available fields (Dimensions, Measures, and so on) in the Data menu.
  4. Under the X shelf, add created from Measures.
  5. Under the Y shelf, add resolved from Measures. Click the field to open the Field Properties menu and make the following changes:
  6. Select Enter/Edit Expression and enter the following expression:
    if([resolved] IS NOT NULL,datediff([resolved],[created]),datediff(now(),[created]))
  7. Click Save.
  8. Select Alias and name the field Days Open.
  9. Under Colors, add assignee from Dimensions.
  10. Under Tooltips, add:
    • Description
    • Issue Key
    • Assignee
    • Date Open
    • Date Closed
  11. Under Filters, add:
    • created
    • resolved
    • Dimensions
  12. Click Refresh Visual.
  13. Click Save. The visual appears in the main area of the dashboard interface.
  14. Add two date filters, created and resolved, in the dashboard, with a date range from 2018-06-25 through 2018-09-12. To create date filters in a dashboard, see Using fixed dates, date picker, mode.
  15. Click Save. The following image shows the new dashboard you created. This visual does not include the null values in the dataset. Proceed to section.

Follow these steps to include null values in the visual.

  1. Hover over the upper right corner of the resolved filter, and click the Gear icon to configure the filter.
  2. In the Settings modal window, click the Style tab, and select the option Permit selection of NULL values.
  3. Click Apply.
  4. On the resolved filter, click the Calendar (calendar) icon. Notice that the Include NULLs option appears in the dropdown menu. If the Permit selection of Null values option is not selected in the previous step, Include NULLs option is not visible in the dropdown.
  5. Close the dropdown menu without selecting the Include NULLs option.

    In the following image, notice that the Current Parameters on the top right corner shows resolved.include_nulls: false, indicating that the Include NULLs option was not selected in the filter.

  6. On the resolved filter, click the Calendar icon and now let's select the Include NULLs option.
  7. In the following image, notice that the Current Parameters on the top right corner shows resolved.include_nulls: true, indicating that the Include NULLs option was selected in the filter. The following visual now includes the null values in the dataset.
  8. To verify that the visual includes null values, hover over one of the selections to view the tooltip. In the following image, notice that Date Closed has a value of NULL.