Creating parameters

Aarthi
Aarthi
  • Updated

To further filter an established query without sifting through the query code, create parameters. To filter your results by specific conditions, you can apply predetermined parameters to a query directly from the dashboard. For example, you can filter by color, results greater than a specific value, or data created after a specific date, while filtering out free text that might not match your results. Use this article to configure, view, and apply a parameter to your query. 

Before you begin

Before configuring parameters for your dashboard, ensure you are familiar with SQL terminology and commands.

Parameters can be applied and modified by users with Read permissions and no SQL knowledge.

Configure a parameter

You can create a parameter by replacing a value in your SQL query with the parameter name and curly brackets. This allows users to later select the value they want to query.

For example, to create a parameter that filters results by color, add a pair of curly brackets around the value and replace the value with the parameter name:

  • Original: WHERE color = ‘green’

  • Parameter: WHERE color = {{Color}}

After adding your parameter to the SQL editor:

  1. Click Run Query to display the parameter at the top of the query editing window. The parameter has two clickable parts:

    • Configure parameter on the left side

    • Edit value on the right side

  2. Click Configure parameter and select the applicable parameter type from the drop-down menu. This specifies the input type used when filtering dashboards.

  3. Click Edit value and enter the filter value.

After running the query, the executed query displays at the bottom of the query editing window.

Apply a parameter to a query

After adding your parameter and running the query, the parameter displays at the top of your query editing window and Insights dashboard.

To apply a parameter:

  1. Hover over the parameter and click Edit value.

  2. Enter your value and select it from the list of options.

  3. Click Update.

View common parameter types

The table below displays common filters and the SQL used to convert them into parameters.

Was this article helpful?

Have more questions? Submit a request