Dashboard Variables

Dashboard variables are variables you can set on a dashboard-wide basis. They allow you to apply filters to multiple charts simultaneously.

Using a dashboard variable is a two part process. First you’ll create the variable, then you’ll connect it to one or more charts.

Below is an example of setting up a Calendar variable and connecting it to a chart. This video also highlights how to see which charts are connected to your variables.

Dropdown

Create a Dropdown

Click Add Control from the dashboard sidebar menu and select Dropdown. You’ll be redirected to the Data Explorer. Find the column you want to use for your category and drag it to the Dimensions field. The values in that column will populate a dropdown menu, which you can use to filter your charts.

Data Explorer

Key-value pair Dropdowns

You can drag a second Dimension into your categorical Dropdown to display one value but filter by another. Check out our tutorial on key value pairs in a categorical Dropdown.

  • Data type: Select the data type for your Dropdown’s results (Text, Number, Boolean, Date).
  • Multi-select: Check this checkbox to allow filtering by multiple values at once. If selecting multi-select, be sure your connected chart’s filter is “is one of” and not “equals” or “like”.
  • Empty state: When no values are selected in the Dropdown, you can either Show all rows in the attached charts or Show none.
  • Initial value(s): Check this checkbox to set custom filter value(s) on load.

Connect a Dropdown to a chart

Open the chart you’d like to connect to your Dropdown in the Data Explorer. Drag the column you want to filter your dataset on into the Filters section, select the filter type, and select your variable name.

A couple things to keep in mind:

  • Your Dropdown must have the same data type as the column you’re filtering on.
  • Your filter type must match the type of Dropdown you’re using. For example, if you’ve left Multi-select unchecked in the Dropdown’s settings, make sure you don’t use filter type “is one of”.

Change the aggregation

Date Bucket

Date Bucket

Create a Date Bucket

Click Add Control from the dashboard sidebar menu and select Date Bucket. A modal will pop up for you to customize your variable settings.

Rename the variable if desired, and select your default bucket.

Add Date bucket selector

Connect a Date Bucket to your chart

Once you’ve created your Date Bucket variable, open a chart you’d like to connect to your Date Bucket. You’ll need a chart grouped by a date column.

Click the date Dimension to open its settings, and open the Time Bucket dropdown. Find your DATE_BUCKET variable and select it.

Note: Quarter bucketing is not supported by Google Analytics.

Choose your bucket

Hidden Variable

Create a Hidden Variable

Click Add Control from the dashboard sidebar menu and select Hidden Variable. A modal will pop up for you to customize your variable settings.

For Date Range or a single Date, you can either set a specific date, or choose a relative date such as the last 30 days.

To set a list of numbers or strings as your variable, check the Is List checkbox, and click Add Value for each additional list item you’d like to add. We’ll translate this to a comma separated list. Text lists will be quoted, numerical lists will not.

Add hidden variable

Connect a Hidden Variable to your chart

Open the chart you’d like to connect to your Hidden Variable in the Data Explorer. Drag the column you want to filter your dataset on into the Filters section, select the filter type, and select your variable name. You’ll need to ensure your Hidden Variable has the same data type as the column you’re filtering on.

Choose the aggregation

Text Input

Text input

Create a Text Input

Click Add Control from the dashboard sidebar menu and select Text Input. A modal will pop up for you to customize your variable settings.

Check Multi-value if you’d like to filter your charts by multiple values. When selected, choose whether all results (Show all) or no results (Show none) are displayed when no filter value is selected.

The Default Value will be used to filter your charts when no value is typed into the input box. This field is optional - leave it blank for an empty result set by default.

Adding text input

Partial string matching

The input variable requires an exact string match. To search by partial strings, select filter type “LIKE” in the Data Explorer, and use percent signs around your search string as needed. For example, to filter by names that start with “A”, set your chart filter to filter by values ‘like’ your input variable, and enter A% into the input widget.

The input widget encloses the search value in single quotes, and therefore does not allow multiple input values at once.

For Default Start and Default End date, you can either set a specific date, or choose a relative date such as the last 30 days.

Connect a Text Input to your chart

Open the chart you’d like to connect to your Text Input in the Data Explorer. Drag the column you want to filter your dataset on into the Filters section, select the filter type, and select your variable name. You’ll need to ensure your Text Input has the same data type as the column you’re filtering on. If you selected Multi-value when creating your text input, be sure to use filter type “is one of”, not “equals”.

Connect a chart

Calendar

Calendar

Create a Calendar

Click Add Control from the dashboard sidebar menu and select Calendar. A modal will pop up for you to choose your calendar variable settings.

For Data type, choose whether you want to filter your charts on a single Date or a Date Range.

Edit the Default value(s) using a custom date, or a relative date as needed.

Add a calendar

Connect a Calendar to your chart

Find the chart you want to connect to your Calendar and open it in the Data Explorer. Drag the date column you want to filter by to the Filters section. Choose your filter type (you’ll probably want to use between or between and including) from the first dropdown, then select {CALENDAR_NAME.START} and {CALENDAR_NAME.END} from the second and third dropdowns.

Connect a chart to your calendar variable

Date Slider

Date slider

Create a Date Slider

Click Add Control from the dashboard sidebar menu and select Date Slider. You’ll be redirected to the Data Explorer where you’ll add a date Dimension and edit it as needed. You can also add a Measure to display the Date Slider in 2D. Then, set the default date range using fixed or relative dates and click Save Chart once completed.

Data Explorer

Connect a Date Slider to your chart

Find the chart you want to connect to your Date Slider and open it in the Data Explorer. Drag the date column you want to filter by to the Filters section. Choose your filter type (you’ll probably want to use between or between and including) from the first dropdown, then select {DATE_SLIDER_NAME.START} and {DATE_SLIDER_NAME.END} from the second and third dropdowns.

If your Date Slider is grouped by hour or minute, select the between filter in the Date Slider Using Hour or Minute section.

Take a look at the video below to see how to set up and connect a Date Slider variable to a chart:

Range Input

Range input

Create a Range Input

Click Add Control from the dashboard sidebar menu and select Range Input. A modal will pop up for you to customize your variable settings.

Choose the Min and Max for your range, edit Precision if you’d like to include decimal values, and set the Default values that will be selected when the dashboard is first loaded.

Range Input Control

Connect a Range Input to your chart

Open the chart you’d like to connect to your Range Input in the Data Explorer. Drag the numeric column you want to filter your dataset on into the Filters section, select between and including for the filter type, and select your Range Input.

Range Input