Cascading filters

Cascading filters allow you to filter based on multiple values in a hierarchy, such as by region, country, and city.

Lower level choices are filtered by the values selected at higher levels. For example, you can create a cascading filter that allows users to select from a list of managers, then select from user groups that are managed by the selected manager. Report data is then filtered to show only records assigned to that group.

Alternatively, you can leave lower levels of the filter unselected, such as by selecting only a manager but no user group. Report data is then filtered to show records assigned to any group managed by that manager.

Create a cascading filter

To create a cascading filter, define each level of the filter, the relationship between levels, and how a selection at each level filters the report data.

Before you begin

Role required: hp_publisher_admin and report_admin

You must have Performance Analytics Premium to create new interactive filters.

Ensure that the structure of the data that you use to create the filter is consistent. For example, in a cascading filter based on location, ensure that the top level choices are all regions, and the second-level choices are all countries. You can define filter conditions to ensure that only appropriate choices for each level are available.

About this task

This procedure includes examples based on a cascading interactive filter using managers and groups. In this example, the top-level choice allows users to select a manager and the second-level choice allows users to select a user group managed by that manager.
Figure 1. Example cascading filter
Note: You can filter reports based on the values in reference fields only. Cascading filters support only the Single Select UI control type.

Procedure

  1. Homepage Admin > Interactive filters.
  2. Click New.
  3. In the Filter based on choice list, select Cascading Filters.
  4. Right-click the form header and select Save.
  5. Define the first level of the cascading filter.
    1. In the Cascading Filter related list, click New.
    2. Select the Table and the Display field from the table that contains the values you want to use as the top-level filter choices.
      For example, to define the top level of a hierarchy based on managers and the groups they manage, select Group [sys_user_group] as the Table and Manager as the Display field.
    3. (Optional) Use the Filters field to limit which choices are available to users.
      Filter conditions are especially useful when you create a cascading filter based on a self-referencing table, such as Location [cmn_location]. Filter the data to ensure each level of the cascading filter has only options appropriate for that level.
    4. Right-click the form header and select Save.
  6. Define the next level of the hierarchy.
    Cascading filters use a one-to-many relationship between higher-level filters and lower-level filters. One higher-level filter can affect the choices available in any number of lower-level filters.
    1. From the manager filter, in the Cascading Filter related list, click New.
    2. Select the Table and the Display field from the table that contains the values you want to use as the second-level filter choices.
      In the managers and groups example, select Group [sys_user_group] as the Table and Name as the Display field.
    3. In the Parent Reference Field field, select the field that contains the value selected from the higher-level filter.
      For example, when you create the Group filter, the Parent Reference Field value is Manager. In this example, the manager selected in the first filter is used to filter the list of available groups based on the Manager field value of each group.
    4. Right-click the form header and select Save.
    5. Repeat these substeps for each additional filter you want to add. To add another level to the filter hierarchy, add a new record in the Cascading Filter related list of the lowest-level filter such as the Group filter, instead of the top-level filter such as the Manager filter.
  7. Define how each filter level applies the filter to reports on a dashboard.
    1. In the Target Tables related list, click New.
    2. Select the Target table that contains the data you want to filter, such as Incident.
    3. Select the Field to filter on.
      The field must reference the table specified in the filter. For example when filtering incident data, the Field for the top-level manager filter is Assignment group.Manager. In this example, the Field for the second-level group filter is Assignment group.
    4. Click Submit.
    5. Repeat these substeps to add targets for each level of the filter.
      You can define multiple targets for each filter level, such as to filter incident data by assignment group or to filter CMDB CIs by support group using the same Groups [sys_user_group] filter.
      Note: A cascading filter hierarchy must specify at least one target. You can define a cascading filter that skips levels in a hierarchy, or a cascading filter that only specifies targets for certain levels in a hierarchy. For example you can define a target only for the Group-level filter and not the Manager-level filter. In this example, reports are filtered only when a user selects a specific group and not just a manager.
    The following images demonstrate the completed configuration for the example cascading filter. The Cascading Filter related list (not shown) in the top-level filter contains the second-level filter.
    Figure 2. Top-level filter
    Figure 3. Second-level filter

What to do next

After you create all levels of the filter, add it to a homepage or dashboard.