Including Null Values in Date Filters

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:

Create a Dashboard with Date Filters

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.

    • Under the X shelf, add created from Measures.
    • Under the Y shelf, add resolved from Measures. Click the field to open the Field Properties menu and make the following changes:
      • Select Enter/Edit Expression and enter the following expression:
        if([resolved] IS NOT NULL,datediff([resolved],[created]),datediff(now(),[created]))
        Click Save.
      • Select Alias and name the field Days Open.
    • Under Colors, add assignee from Dimensions.
    • Under Tooltips, add Description, Issue Key, Assignee, Date Open, and Date Closed.
    • Under Filters, add created and resolved from Dimensions.
  4. Click Refresh Visual.
  5. Click Save. The visual appears in the main area of the dashboard interface.
  6. 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.
  7. Click Save.

    The following image shows the new dashboard you created. This visual does not include the null values in the dataset. Proceed to Include Null Values in the Visual section.

Include Null Values in the Visual

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.

    Configure date 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) 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.

    Displaying the Visual without the Null Values
  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 below visual now includes the null values in the dataset.
    Displaying the Visual with Null Values
  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.

    Displaying Null Values in the Tooltip