• Products
  • Documentation
  • Resources

Atlassian Analytics is in open beta

Only customers with a Cloud Enterprise plan for Jira Software or Jira Service Management have access to Atlassian Analytics.

Set up a “Calendar” control

“Calendar” controls let you filter your charts on a single date or a date range.

Setting up a “Calendar” control requires two main steps:

  1. Create the “Calendar” control for your dashboard.

  2. Connect the “Calendar” control to a chart.

Create a “Calendar” control

To add a “Calendar” control to your dashboard:

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

  2. Select Add control > Calendar from the dashboard sidebar. A pop-up will appear for you to configure the control’s settings.

  3. Optionally, change the Variable name of the control.

  4. For Calendar type, select whether you want to filter your charts on a single date or date range.

  5. 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.

  6. Optionally, select Connect this control to new and existing charts. Learn more about connecting the control to charts.

  7. Select Add.

  8. Place the newly created “Calendar” control anywhere on your dashboard.

Connect a “Calendar” control to a chart

After you’ve created your “Calendar” 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.

Automatically connect to new and existing charts

For a “Calendar” to automatically connect to a chart, the queries within the chart must:

  • be built using visual mode

  • use the same data source as the control

If the chart's queries meet these criteria, we’ll automatically apply a query filter to the visual mode queries.

To automatically connect the control to all charts:

  1. Create the “Calendar” control or edit an existing one by hovering over it and selecting More actions () > Edit control.

  2. Select Connect to new and existing charts.

  3. Select a Data source and Column. The “Calendar” control will filter the selected column.

  4. Select a Filter operator to use in the automatically applied query filter. Learn more about the available filter operators.

  5. Select Add or Save to apply the changes to the control.

Manually connect to charts

In a visual mode query

To connect a “Calendar” 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:

      • If the “Data type” of your control is Date, use {CALENDAR_NAME}

      • If the “Data type” of your control is Date range, use {CALENDAR_NAME.START} and {CALENDAR_NAME.END} for the start and end dates, respectively.

      • Replace CALENDAR_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 Calendar control to filter the Created At column in a visual mode query.

In a SQL mode query

Connect a “Calendar” control in your SQL mode query by referencing its dashboard variable:

  • If the “Data type” of your control is Date, use {CALENDAR_NAME}

  • If the “Data type” of your control is Date range, use {CALENDAR_NAME.START} and {CALENDAR_NAME.END} for the start and end dates, respectively.

Replace CALENDAR_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 “Calendar” control:

1 2 3 SELECT COUNT(DISTINCT "Jira Issue"."issue_id") AS "Count of distinct Issue Id" FROM "jira _issue" AS "Jira Issue" WHERE "Jira Issue"."created_at" BETWEEN {CALENDAR_NAME.START} AND {CALENDAR_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