Manage parameters in datasets

Follow the instructions below to add parameters to your dataset:


Parameters added to a dataset will apply to all the charts created from this dataset.

  1. Open your dataset and toggle the Parameters page.

  2. Click Add.

  3. In the Add parameter window:

    1. Name your parameter. For this example, let's call it scale.

    2. Select the parameter Type. You can select the following parameter types:

      For this example, select String.

    3. Specify the parameter's Default value. This is a required field. It's useful when you have no parameter value set in the dashboard, chart URL, or chart settings.

      For this example, type the following: year.

      This is what your configuration should look like:


    4. Click Add. You'll see your parameter in the left pane:


  4. Click Add.


Now you can apply the parameter to any chart created from this dataset.

Apply dataset-wide parameters to a chart

For this example, we're going to use the Price chart on the first page of your Demo dashboard.

  1. Add a calculated field to integrate the parameter into your chart's X axis:

    1. In the left pane under the dataset, click +Field.

    2. Name your new field Period and write the following formula:

      DATETRUNC([Booking Start], [scale])
    3. Click Create.

    4. Drag and drop the Period field to the X axis. You should see the following:


    5. Click Apply

  2. Add a selector to apply the new parameter to your chart:

    1. Click AddSelector.

    2. Toggle Manual input.

    3. Under Field or parameter name, type Scale.

    4. Under Default value, click Not selected.

    5. In the Possible values window, add the following items to the list:

      • year

      • month

      • week

      • day

      The result should look like this:


    6. Click Apply.

    7. To select the default value, select year from the Not defined drop-down menu.

    8. Under Title, type Period:.

      Your complete selector configuration should look like this:


    9. Click Add.

    10. Place the selector under the chart:


    11. In the upper-right corner, click Save.

  3. Select different parameter values from the chart and observe how the level of detail changes on the chart: from year to day.

See also