Skip to main content
Requires the dashboard-controls feature flag. For Cloud, contact support. For self-hosted instances, add dashboard-controls to LIGHTDASH_ENABLE_FEATURE_FLAGS.
Dashboard controls are the filters and parameter controls at the top of a dashboard. Filters narrow the data. Parameter controls set values used by your chart queries. The examples follow a Revenue comparison dashboard:
  • Two Order revenue tiles compare the same chart in different currencies.
  • A Payment revenue tile uses a currency parameter from another model.
  • An Order status filter limits the comparison to completed orders.
Both charts’ currency parameters offer USD, EUR, and GBP.

Set different values on two copies of a chart

Give each copy its own control to compare USD and EUR side by side.
1

Add the first control

Open Edit dashboard → Add → Parameter and choose Reporting currency. Set USD and use Rename to name it Primary currency. Both order tiles now use USD.
Dashboard Add menu offering Filter to narrow tile data and Parameter to set a value used by tilesDashboard Add menu offering Filter to narrow tile data and Parameter to set a value used by tiles
2

Choose its tiles

Click Choose tiles. On the comparison Order revenue tile, clear the selected parameter, then click Apply. That tile stops using Primary currency.
Primary currency assigned to the first Order revenue tile, with the comparison tile and Payment revenue not assignedPrimary currency assigned to the first Order revenue tile, with the comparison tile and Payment revenue not assigned
3

Add the comparison control

Add another Reporting currency control, set EUR, and name it Comparison currency. In Choose tiles, click Set this tile on the comparison tile, then select Orders Reporting currency. Click Apply → Save changes.
Primary currency set to USD and Comparison currency set to EUR, with the two copies of Order revenue showing their respective currenciesPrimary currency set to USD and Comparison currency set to EUR, with the two copies of Order revenue showing their respective currencies
The first control for a parameter targets all relevant tiles, including those added later, even after you exclude all current tiles. Additional controls for that parameter start with no tiles assigned.

Clear a value or exclude a tile

A control’s value and tile assignments are independent. In edit mode, open the control:
  • To clear its value, click the input’s clear button. Tile assignments stay in place. The control then shows the parameter’s default, or is not set if there’s no default. If a tile can’t run without a value, it shows needs a value instead.
  • To exclude a tile, open Choose tiles and clear that tile’s selected parameter. Clear all tiles excludes all current tiles.
Click Apply → Save changes. The Order revenue chart is saved with EUR, and its parameter has a GBP model default. These give different results:
Primary currency editor set to USD, with a GBP model default and one of three tiles assignedPrimary currency editor set to USD, with a GBP model default and one of three tiles assigned
After clearing Primary currency, the first order tile uses the model default, GBP.
Order revenue primary showing GBP and revenue of 1,917.60 after clearing the assigned control valueOrder revenue primary showing GBP and revenue of 1,917.60 after clearing the assigned control value
To continue the comparison, restore Primary currency to USD and include the first order tile.

Set parameters across models

Use Primary currency to change the order and payment charts together, even though their parameters belong to different models. Parameters can share a control when their type, single or multiple selection, and allowed values match.
1

Choose the payment parameter

Open Primary currency → Choose tiles. On Payment revenue, click Set this tile and select Payments Settlement currency.
2

Save the assignment

Click Apply → Save changes. Primary currency now sets both models’ parameters. Comparison currency still sets only the second order tile.
Primary currency mapped to Orders Reporting currency and Payments Settlement currency, with the second order tile assigned to Comparison currencyPrimary currency mapped to Orders Reporting currency and Payments Settlement currency, with the second order tile assigned to Comparison currency

Group controls and hide a control from viewers

Keep related inputs together, and hide the fixed comparison value from viewers.
1

Group the controls

Create a section called Currency comparison and move Order status into it. For each parameter control, open Settings → Section, choose Currency comparison, and click Apply.
2

Hide the comparison input

In Comparison currency → Settings, turn off Show to viewers. Click Apply → Save changes. Its EUR value still applies to the comparison tile. In edit mode, the control shows an eye-off icon.
Comparison currency settings in Currency comparison, with Show to viewers switched off while the value still applies to its tilesComparison currency settings in Currency comparison, with Show to viewers switched off while the value still applies to its tiles
Viewers can change Primary currency for the first order tile and the payment tile. The comparison tile stays in EUR.
Currency comparison section with Primary currency visible. The first order tile and payment tile show USD, while the comparison order tile shows EUR.Currency comparison section with Primary currency visible. The first order tile and payment tile show USD, while the comparison order tile shows EUR.

Save the dashboard as code

Parameter controls, their tile assignments and sections are saved in the dashboard file. Use the standard download and upload commands. With dashboard-controls enabled, downloads use these references:
  • A section’s slug identifies it. A filter or control’s sectionSlug places it in that section.
  • Each tileSlug identifies one tile, so copies of the same chart can receive different values.
To set the order of controls on the bar, see Control order in dashboards-as-code. Parameter controls go under config.parameterControls. Each control has a label, a value, and a parameters list that says which parameters it sets, and on which tiles.

Set a parameter on every tile

Use all to set the parameter on every tile that uses it, including tiles added later.

Exclude tiles or pick exact tiles

Use except to leave out some tiles, or only to list the exact tiles. Name tiles by their tileSlug.
Only one control per parameter can use all or except. Other controls for that parameter use only, each with different tiles.

Set parameters from different models

One control can set parameters from different models if they take the same type of value and have the same options.

Hide a control or put it in a section

hidden: true hides the control from viewers, but its value still applies. sectionSlug puts it in a section.

Full example

This file saves the Revenue comparison dashboard from the steps above, including its filter, section, and control assignments. Save it as lightdash/dashboards/revenue-comparison.yml, adapting the chart and space slugs, parameter keys, and filter field references to your project.
Revenue comparison