Filtering data in multiple widgets

KUMA allows you to filter data in widgets of the Events type by selecting filtering parameters in the dashboard.

To filter data in multiple widgets within one dashboard, you need to specify one or more global variables in the properties of the dashboard. Then add global variables to the SQL queries of the widgets to which you want to apply these global variables. When you assign a new value to a global variable, all widgets that use this variable automatically rebuild charts based on the new value.

Global variables are applied by clicking on a segment of the chart or on text from the legend of the chart. KUMA displays a menu with commands that apply the data category of the selected chart segment or plot legend item to a variable.

We do not recommend setting more than five variables within a dashboard. This can lead to unstable operation of the dashboard.

Configuring data filtering for multiple widgets at the dashboard level

To configure global variables for filtering data at the dashboard level:

  1. In the Dashboards section, select a dashboard and click the Edit button to enter the dashboard editing mode.
  2. Click the Settings button.
  3. This opens a window; in that window, in the Variables section, select the Global variables tab.
  4. Click Add.
  5. In the new row, enter the name of the variable. Local and global variable names must be unique within a dashboard.

    The names of all dashboard widgets to which you add global variables are listed in the Used in widgets column.

    The names of the global variables are displayed in the commands of the context menu when you click a segment of the chart or a an item in the legend of the chart.

  6. Save your changes.
  7. Select an existing Events widget or click the Add widget button and then select the Events widget type. In this widget, you will be configuring actions on click.
  8. In the widget properties window, select the General tab.
  9. In the Available variables section, add one or more global variables that you have added in the dashboard properties.
  10. If necessary, in the SQL query field, add global variables to the WHERE clause using the filter() function. This also applies the configured actions to this widget.
  11. Select the Actions tab.

    If you want to display a menu with a command to filter data by the selected segment category when a segment of the chart is clicked:

    1. In the Chart segment section, enable the Filter by variable option.
    2. In the Category list, select the variable into which you want to substitute the value of the category alias specified in the SQL query.

      The Category option is available only for the stacked bar chart type.

    3. In the Value list, select the variable into which you want to substitute the value of the value alias specified in the SQL query.

    If you want to display a menu with a command to filter data by the selected value when a legend item is clicked:

    1. In the Legend item section, enable the Filter by variable option.

      If necessary, click the Copy from chart segment settings button to automatically transfer the selected parameter values from the Chart segment group of settings to the Legend item group of settings.

    2. In the Value list, select the variables in which you want to be able to substitute legend item variables.
  12. In the properties of other widgets to which you want to apply global variables:
    • On the General tab, in the Available variables section, add one or more global variables.
    • In the SQL query field of the widget, add global variables to the WHERE clause using the filter() function.

Applying data filtering to multiple widgets at the dashboard level

To apply a global variable to filter data between widgets:

  1. In the Dashboards section, select the dashboard to whose widgets you want to apply the global variable.
  2. Find a widget that has actions on click configured. Click a segment of the graph or on the arrow icon (Arrow_down_icon_UIF) next to the legend item to open a menu.
  3. In the menu, click Apply category to variable <variable name> or Apply value to variable <variable name>.

    The value of the selected category or legend item is assigned to the variable. Within the current dashboard, all widgets that use this variable rebuild their charts based on the new value of the variable. Such widgets are marked with a funnel icon with a number indicating the number of filters applied (funnel_applied_icon). A list of applied global variables is displayed in the upper part of the screen. To clear data filtering for a widget, click the funnel icon with the number (funnel_applied_icon). To clear data filtering for all widgets on the dashboard, click Reset all in the upper part of the dashboard.

Page top