• Products
  • Documentation
  • Resources

Atlassian Analytics is in an early access program

Only people who are part of this invite-only early access program have access to Atlassian Analytics.

Set up a “Date slider” control

“Date slider” controls let you focus on a specific date range for your data.

Setting up a “Date slider” control requires two main steps:

  1. Create the “Date slider” control for your dashboard.

  2. Connect the “Date slider” control to a chart.

Create a “Date slider” control

To add a “Date slider” control to your dashboard:

  1. Open the dashboard where you want to add the “Date slider” control.

  2. Select Add control > Date slider from the dashboard sidebar. This takes you to the control editor, which is similar to the chart editor. Learn more about the chart editor.

    1. You’ll use Visual SQL to create your “Date slider” control. Learn more about Visual SQL.

    2. Instead of a chart preview, you can preview your “Date slider” control before saving it.

  3. Add a date column to the “Columns” section of the query.

  4. Optionally, add a numeric column to make a two-dimensional “Date slider” control.

  5. Select Run query. The preview pane will update so you can configure the control’s settings.

  6. Optionally, change the Name of the control.

  7. Edit the Default start and end dates using fixed dates, or use a combination of relative date variables and date and time functions for dynamic filtering.

  8. Optionally, select a Background color for your control. By default, it uses the color from the dashboard theme.

  9. Select Save to dashboard.

  10. Place the newly created “Date slider” control anywhere on your dashboard.

Connect a “Date slider” control to a chart

After you’re created your “Date slider” control, you’ll need to connect it to a chart to start using it to filter. Connect it to a chart by using its corresponding dashboard variable in a query.

You can also connect controls in other Visual SQL steps. Learn more about connecting controls outside of a query.

In a visual mode query

To connect a “Date slider” control to a chart using a visual mode query:

  1. Open the chart editor by creating a new chart or editing an existing chart on the dashboard.

  2. In the “Filters” section of your visual mode query:

    1. Add the date column you want the control to filter.

    2. Select the filter operator. Most people use between and including.

    3. Reference your control using its dashboard variable:

      1. Use {DATE_SLIDER_NAME.START} for the start date.

      2. Use {DATE_SLIDER_NAME.END} for the end date.

      3. Replace DATE_SLIDER_NAME with the name of your control.

  3. Select Run query. The result table will update with the new filter applied to the data.

  4. Select Save to dashboard to save the chart.

Using a Date slider control to filter the Created At column in a visual mode query.

In a SQL mode query

Connect a “Date slider” control in your SQL mode query by referencing the control using its dashboard variable:

  • Use {DATE_SLIDER_NAME.START} for the start date.

  • Use {DATE_SLIDER_NAME.END} for the end date.

Replace DATE_SLIDER_NAME with the name of your control.

Here’s an example of how you might get the total number of Jira issues created between the selected dates of a “Date slider” control:

1 2 3 SELECT COUNT(DISTINCT "Jira Issue"."issue_id") AS "Count of distinct Issue Id" FROM "public"."jira _issue" AS "Jira Issue" WHERE "Jira Issue"."created_at" BETWEEN {DATE_SLIDER_NAME.START} AND {DATE_SLIDER_NAME.END};

Verify your chart is connected to the control

To make sure you’ve properly connected your chart to the control, you could verify this by updating the values of the control and seeing if your connected chart filters accordingly.

Alternatively, there are two ways you can check for all charts that are connected to the control.

One option is to:

  1. Hover over the control.

  2. Select its More actions () menu > Show connected charts.

The other option is to:

  1. Select Settings from the dashboard sidebar.

  2. Go to the Variables tab.

  3. Select the chevron () next to the variable name of the control to expand its settings.

  4. Select Show connected charts.

Both options highlight all charts on the dashboard that are connected to that particular control.

Additional Help