Overview
Insightboard filters are a convenient way to dynamically narrow down the displayed data in an insight, without having to edit its SQL code.
This article explains how to write your insight SQL with filters and how to apply the filters to narrow down the data displayed by your insights.
Prerequisites
To be able to apply a filter to an insightboard, you must have Update permissions for this insightboard.
To be able to include and apply a filter, you must have created the filter.
For more information, see Create filters for insightboards.
Include the filter in the insight SQL
After you created your insightboard parameters, you can add them to your insightboards.
Perform the following:
In the navigation pane, expand Insights and click Insightboards.
Open the insightboard where the insight that you want to filter is located.
In the upper-right corner, expand the menu.
Click Re-arrange.
Click </> (Edit insight) of the insight that you want to apply a filter to.
Edit the SQL query of the insight to include the filter.
You do this by using theWHERE
clause and the parameter key.
For more information about the parameter key, see Create filters for insightboards.
The syntax for getting the filter’s value is‘%%param_key%%
For more information, see Sample filter syntax.To check whether the syntax is correct, click Execute.
Click Save and leave.
Filter the insightboard data
To filter an insightboard, perform the following:
In the navigation pane, expand Insights and click Insightboards.
Click the desired insightboard.
The insightboards automatically display all filters that exist in the SQL of all the insights on this board.
When you open an insightboard, if your filter does not have a predefined value, the filter displays None selected under the parameter title.Select a value from the desired filter and click Apply selection.
The output of the insightboards that contain the selected filter change accordingly.
NOTE: When you use a filter, it applies to all insights in the insightboard that contain this filter.
To save the selection, click Save filters.
The filters that you apply are not saved automatically.To clear the filter, click the filter again and click Remove selection > Save filters.