Query Parameters

What are query parameters?

Sometimes you would need to switch between several time periods or user groups in one chart. For instance, if you want to measure progress in revenue over time, you would most likely want to compare it month-by-month and have the same chart for January, February, etc. To avoid creating multiple charts for each month, you can use query parameters instead.

Query parameters will let you segment and switch between different data groups in the same chart, whether it is a simple or SQL chart.

Add a simple chart parameter

To add a parameter, open the chart builder by creating a new chart or clicking the cog icon next to the existing one and click +Add filter. In a new window, select a field that your parameter will be based on (e.g. Date for periods of time, Payment Type for payment types, etc.) and specify the filter type (e.g. more than, equals to, etc.).

For example, if you want to switch between different payment types on your chart, you would put Payment Type as your field and Equals as your filter type.

Then, scroll down the last dropdown menu and click +Add Parameter.

From there, you can specify the keyword and title of a new parameter as well as select its type (e.g. text, number, dropdown list, etc.)

A new parameter will appear under your chart in the chart builder.

To edit a parameter, click on the cog icon to the right of the parameter's name.

Add a SQL chart parameter

To add a new parameter to a SQL chart, click the Parameter button in the Live Query builder.

From there, specify the keyword and title of a new parameter as well as select its type (e.g. text, number, dropdown list, etc.)

A new parameter will appear under your chart in the chart builder and in your query between double curly braces. To edit a parameter, click on the cog icon to the right of the parameter's name.