Adding a Date Range Filter

Date range filters are used to limit the results on a dashboard to data that falls in (or outside of) certain date and time groupings. Date range filters are available for properties with date, dateTime, and time data types. Follow the instructions below to create a date range filter.

  1. Open the dashboard that you want to add the filter to.
  2. In the Hi-Res Analytics main toolbar, click Filters and select Create a Filter. The Create Filter dialog box is displayed.

  3. Click in the Fields field to open the property drop-down list and determine the date, dateTime, or time type property to filter on. The values for this property will be used to determine the date ranges for the filter. The list of available properties depends on the selected data type for the dashboard.

    For example, the following image shows the list of properties that are available for a dashboard whose source is a graphmart that contains data about tickets sold for various types of events. The type for the dashboard is tickit_events:

    The list below describes the icons and options that are available when choosing a property:

    • The Root Value () is the instance URI for the root resource—the URI for the instances of the class that was chosen as the data type for the dashboard.

      To view the root values, you can use the STR function to show a string representation of the URIs.

    • Linked classes are represented by incoming () and outgoing () connection icons. The properties in those classes with a path to another class are denoted with a circle icon (). Selecting a linked property navigates to that class and displays its properties. For this example filter, selecting EventDate, navigates to the tickit_dates class where a date type property can be selected.
    • When a property or path is selected, the breadcrumbs at the top of the dialog box show you the property path. You can click the clear icon () to clear the path and start again or you can click the forward () or back () arrows to go forward or backward one or more levels at a time.
    • After you have selected a property, you can apply a function or formula to that property to calculate the values that are displayed in the filter. To add a function, click the function button (fx) at the top of the drop-down list. The functions that are available depend on the data type of the selected property. To choose a more advanced function or type a formula, click Advanced. The Calculated Value dialog box opens and enables you to choose additional properties and functions. For more information, see Calculating Values in Lenses and Filters.
  4. After you have selected the property to filter on, click Close to close the Fields drop-down list.
  5. Next, click the Filter field and select Date Range from the drop-down list. The dialog box is refreshed to show the Filter Properties, Format, and other options that are available for the filter type:

  6. Configure any of the following properties. Interval Unit and Interval are required fields, and the rest of the fields are optional:
    • Title: Defines the title that appears at the top of the filter when it is added to the dashboard. If Title is blank, the Fields value is used as the title.
    • Label Field: If you want to populate the ranges with a label other than the one specified in Fields, you can select an alternate property in this field.
    • Interval Unit: Click this field to choose the unit of time for the Interval value. Depending on the data type of the selected property, a subset of the following values are available to choose from: Millennium, Century, Decade, Year, Month, Week, Day, Hour, Minute, or Second.
    • Interval: This setting specifies a number that defines the length of time in each grouping. For example, if the Interval Unit is "Decade," an Interval value of 2 creates groups of two-decade increments.
    • Exclude: This setting controls whether selecting a range in the filter narrows the results to show only the records that are included in that range or whether selecting a range excludes the records that fall in that range. When Exclude is disabled, selecting a range narrows the dashboard results to show only the records that fall in that range. When Exclude is enabled, selecting a range filters out all of the records that fall in that range.
    • Show Bars: This setting controls whether the total values for the selected property appear as a bar graphic in the background of the filter.
    • Always Show Checkboxes: This setting controls whether checkboxes are shown next to the items in the filter.
    • Show Counts: This setting controls whether the number of results for each range are displayed in parentheses next to the range.
    • Respond to Other Filters: This setting controls whether the results of this filter change based on the selections made in other filters on the dashboard.
  7. If you would like to specify the format to for date values that are displayed in the filter, click the Format Time field and select a format from the drop-down list.
  8. If you would like to be able to further constrain the data that appears in the filter, you can add one or more subfilters. To add a subfilter, click Create Filter under Subfilters. The process of creating a subfilter is the same as the process for the parent filter. However, the subfilter is not displayed on the dashboard. It is visible only when editing the parent filter, and the subfilter's configuration affects only the parent filter and any sibling subfilters.
  9. When you have finished configuring the filter, click OK to add it to the dashboard. The new filter appears in the left pane and displays the values that are available for filtering the data.

    For example, the filter in the image below shows date ranges for events. The Interval Unit is Month, and the Interval is 3 months.

    Depending on whether the Exclude option is enabled or disabled, clicking a range in the filter refreshes the dashboard to show only the data that is in the selected range or only the data that is outside of the range.

When working with the filter on the dashboard, the following options are available for sorting and configuration:

  • show/hide sort details: Shows or hides the following option for sorting the results in the filter:
    • Direction: This option controls how you want to order the date ranges in the filter, depending on the Format specified for the values in the filter. For number values, Count Ascending orders results from the earliest to latest date and Count Descending orders results from the latest to earliest date. For character values, Name Ascending orders results in alphabetical order and Name Descending orders results in reverse alphabetical order.
  • show/hide filters: This option is displayed when a range is selected. It shows or hides the selection.
  • Menu (): The menu contains the following options:
    • Select All Visible: This option selects all of the ranges that are listed in the filter.
    • Clear: This option is available when one or more ranges are selected. Clicking Clear removes the selection..
    • Designer: Selecting this option opens the designer so that you can view or change the filter configuration.
  • Close (X): Clicking X deletes the filter from the dashboard. This action cannot be undone.