Skip to main content

Filter Queries

  • 2 minutes to read

You can filter SQL queries constructed in the Query Builder by including the WHERE clauses in the query. Filters can be applied to underlying or aggregated data. The applied filters affect all dashboard items that use the filtered query. Columns from this query are used to build filter criteria.

To filter a query, deselect added tables and click the ellipsis button next to the Filter field in the Query Builder.

wdd-invoke-filter-editor-for-query

This invokes the Filter Editor dialog where you can build filter criteria.

wdd-filter-editor-filter-query

Tip

Documentation: Filter Editor

The Filter Editor enables you to compare field values with the following objects:

  • Value - Allows you to compare field and static values.
  • Property - Compares different field values.
  • Parameter - Allows you to compare field and query parameter values. You can choose an existing query parameter or create a new one by selecting Create new parameter. If you want to change the query parameter value dynamically, you need to bind it to a dashboard parameter. Refer to the following article for more information: Specify the Query Parameter Value.

    SqlFiltering_FilterEditor_ParameterDropdown

Note

The Group Filter option from Query Properties allows you to apply filtering to grouped/aggregated data fields by including HAVING clauses in the query. The Group By and Aggregate options in Column Properties manage grouping and aggregation. See the Edit Column Settings paragraph in the Query Builder topic for more information.