> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lightdash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dashboard parameter controls

> Set parameter values for selected dashboard tiles and save the controls as code

[Experimental](https://docs.lightdash.com/support/feature-badges.md#experimental)

> [!NOTE]
>
> Requires the `dashboard-controls` feature flag. For Cloud, contact [support](https://docs.lightdash.com/support). For self-hosted instances, add `dashboard-controls` to [`LIGHTDASH_ENABLE_FEATURE_FLAGS`](https://docs.lightdash.com/self-host/customize-deployment/environment-variables#feature-flags).

Dashboard controls are the filters and parameter controls at the top of a dashboard. [Filters](https://docs.lightdash.com/explore/dashboards/filter.md) narrow the data. Parameter controls set values used by your [chart queries](https://docs.lightdash.com/semantic-layer/parameters.md).

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 tiles](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/add-parameter-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=5f589d01a3e27531678830007551cf57)

**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 assigned](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/targets-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=fe853d5eef85c6c0d85fea6f5cf88bc9)

**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 currencies](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/two-controls-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=1a5d1bd03b76c60be23f91443c7acdc6)

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.
* 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:

| Action | Value used by Order revenue |
| - | - |
| Clear the control value | `GBP` — the model default, then the chart-saved value if there is no default |
| Exclude the tile | `EUR` — the chart-saved value, then the model default if the chart has no saved value |

![Primary currency editor set to USD, with a GBP model default and one of three tiles assigned](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/editor-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=1e3cbaed5e3aa925db7c773c96f6cfef)

> [tab] Cleared value
>
> 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 value](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/clear-result-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=785ad2a4a22399b8efa398ae8fc7de1a)

> [tab] Excluded tile
>
> After excluding the first order tile, it uses the chart-saved value, `EUR`.
>
> ![Order revenue primary showing EUR and revenue of 2,157.30 after excluding the tile from the control](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/exclude-result-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=1ceb7174ee4af49703bb5bbcd41ef3e9)

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 currency](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/tile-picker-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=0ab986169d11e62d2364ca4c4de51d04)

## 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](https://docs.lightdash.com/explore/dashboards/filter.md#group-filters-into-sections) 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.

![Comparison currency settings in Currency comparison, with Show to viewers switched off while the value still applies to its tiles](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/visibility-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=cc159d0421c7f6a6a48f04634b9b2037)

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.](https://mintcdn.com/lightdash/jiY_Laufpjl2r2j4/images/explore/dashboards/parameter-controls/viewer-light.png?fit=max\&auto=format\&n=jiY_Laufpjl2r2j4\&q=85\&s=7f21e3b8b033a6406a2b0bc11b831d39)

## Save the dashboard as code

The YAML below saves the same dashboard, 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. Use the standard [download](https://docs.lightdash.com/workflow/content-as-code.md#lightdash-download) and [upload](https://docs.lightdash.com/workflow/content-as-code.md#lightdash-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.

Keep a section's slug when renaming it so uploads update the same section.

```yaml Revenue comparison [expandable] theme={null}
contentType: dashboard
version: 1
name: Revenue comparison
slug: revenue-comparison
spaceSlug: jaffle-shop
tabs: []
tiles:
  - tileSlug: order-revenue-primary
    type: saved_chart
    x: 0
    y: 0
    w: 12
    h: 4
    properties:
      chartSlug: order-revenue
      title: Order revenue (primary)
      hideTitle: false
  - tileSlug: order-revenue-comparison
    type: saved_chart
    x: 12
    y: 0
    w: 12
    h: 4
    properties:
      chartSlug: order-revenue
      title: Order revenue (comparison)
      hideTitle: false
  - tileSlug: payment-revenue
    type: saved_chart
    x: 24
    y: 0
    w: 12
    h: 4
    properties:
      chartSlug: payment-revenue
      title: Payment revenue
      hideTitle: false
filters:
  dimensions:
    - label: Order status
      sectionSlug: currency-comparison
      target:
        fieldId: orders_status
        fieldName: status
        tableName: orders
      operator: equals
      values: [completed]
      disabled: false
      tileTargets: {}
config:
  isDateZoomDisabled: false
  controlSections:
    - slug: currency-comparison
      name: Currency comparison
      collapsed: false
  parameterControls:
    - slug: primary-currency
      label: Primary currency
      sectionSlug: currency-comparison
      value: USD
      valueType:
        type: string
        multiple: false
      parameters:
        orders.reporting_currency:
          except: [order-revenue-comparison]
        payments.settlement_currency: all
    - slug: comparison-currency
      label: Comparison currency
      sectionSlug: currency-comparison
      hidden: true
      value: EUR
      valueType:
        type: string
        multiple: false
      parameters:
        orders.reporting_currency:
          only: [order-revenue-comparison]
```

Use `all` for every matching tile, `except` to exclude named tiles, or `only` for an exact list. `only: []` assigns no tiles.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.