Parameters in DataLens

A parameter is a variable that can substitute constant values in calculated fields. Parameters can be created at the dataset level and chart level.

Dataset parameters are available in all charts created based on this dataset, while chart parameters are only available in the chart they're created in. The default value for a dataset parameter can be overridden at the chart level.

Using parameters

With dataset or chart parameters, you can manage formulas and change visualization in a chart.
The saved dataset parameters are substituted in all charts based on this dataset when they're uploaded.

You can edit parameter values on dashboards using selectors with manual input. However, you cannot do the following:

  • Use the Multiple choice option.
  • Choose an operation in a selector (leave a dash in the selection field from the Operation drop-down list).
  • When using a selector based on a dataset parameter, you must unlink the selector from any others on the dashboard tab (set Ignore as your link type).

You can also specify parameter values in chart links. To do this, add ? at the end of a URL, write a parameter name with no space after the URL, put =, and specify a parameter value with no space. You can list multiple parameters in a URL using & as a separator.

To use a chart with a parameter:

  1. Add a parameter to a dataset or chart.

  2. Place your chart on a dashboard.

  3. Add a selector to the dashboard to manage the chart parameter:

    • Select Manual input.
    • In the Field or parameter name field, enter the name of the parameter from the chart.
    • Leave a dash in the selection field from the Operation drop-down list.
    • In the Default value field, specify the value to be substituted in the chart parameter.
    • Enter the selector Name to be displayed on the dashboard.

    By changing selector values, you can customize visualization in the chart through the parameter.

Limitations

When using parameters, keep in mind the following parameter naming restrictions:

  • A parameter name may only contain Latin letters (both uppercase and lowercase), numbers, hyphens (-), and underscores (_).
  • The name can't be longer than 36 characters.
  • It can't start with an underscore: _name.
  • The following parameter names are reserved and can't be used: tab, state, mode, focus, grid, tz, from, and to.
  • Parameter names are case-sensitive: Test and test are different parameters.
  • Parameter names can't be the same as dataset field names.
  • After adding a parameter to a dataset, make sure to save charts in the wizard again.
  • If a dataset and a chart have parameters with the same name, the parameter from the chart is ignored.

See also