Our documentation now lives on the Atlassian Support site at https://support.atlassian.com/analytics/resources/.
Set up a "Dropdown" control
“Dropdown” controls let you display values of a query into a searchable list.
Setting up a “Dropdown” control requires two main steps:
Create the “Dropdown” control for your dashboard
Connect the “Dropdown” control to a chart
Create a “Dropdown” control
To add a “Dropdown” control to your dashboard:
Open the dashboard where you want to add the “Dropdown” control.
Select Add control > Dropdown from the dashboard sidebar. This takes you to the control editor, which is similar to the chart editor. You’ll use Visual SQL to create your “Dropdown” control, but instead of a chart preview, you can preview your “Dropdown” control.
Add the column you want to use for your category to the “Columns” section of the query. The values in that column will populate the options in the “Dropdown” control.
Select Run query. The preview pane will display the control’s settings.
Edit the control’s settings as needed. (See next section to learn more about “Dropdown” settings)
Select Save to dashboard.
Place the newly created “Dropdown” control anywhere on your dashboard.
“Dropdown” control settings
You can edit the following settings for your “Dropdown”:
Name
The control’s name
Data type
The data type for your “Dropdown” results (Text, Number, Boolean, or Date)
Multi-select
Allows filtering by multiple values at once. If this is deselected, you can only select one value in the “Dropdown” at a time.
Empty state
Only available when Multi-select is selected
Specifies what happens when no values are selected in the “Dropdown”. There are two options:
Show all: does not filter the connected charts
Show none: shows no data for connected charts
Initial values
Set default values to select when you load the dashboard
Connect a “Dropdown” control to a chart
After you’ve created your “Dropdown” control, you’ll need to connect it to a chart in order to start using it to filter. You can do this by using its corresponding dashboard variable in a Visual SQL query.
In a visual mode query
To connect a “Dropdown” control to a chart using a visual mode query:
Open the chart editor by creating a new chart or editing an existing chart on the dashboard.
In the “Filters” section of your visual mode query:
Add the column you want the control to filter. It must have the same data type as your “Dropdown” control.
Select the appropriate filter operator. If you selected Multi-select in your “Dropdown” settings, use is one of.
Select your control’s variable.
Select Run query. The result table will update with the new filter applied to the data.
Select Save to dashboard to save the chart.
In a SQL mode query
The syntax for connecting a “Dropdown” control in your SQL query varies depending on whether or not “Multi-select” is selected in the control’s settings.
Single-select “Dropdown”
If “Multi-select” is deselected, the syntax is simple: {DROPDOWN_NAME}
. Replace DROPDOWN_NAME
with your control's name.
Here’s an example of how someone might get the total number of Jira issues where the project type is equal to the selected “Dropdown” value:
SELECT COUNT(DISTINCT "Jira Issue"."issue_id") AS "Count of distinct Issue Id"
FROM "jira _issue" AS "Jira Issue"
INNER JOIN "jira_project" AS "Jira Project"
ON "Jira Project"."project_id" = "Jira Issue"."project_id"
WHERE "Jira Project"."project_type" = {DROPDOWN_NAME}
Multi-select “Dropdown”
If “Multi-select” is selected, use the following syntax:
to include data with the selected “Dropdown” values:
{DROPDOWN_NAME.IN('"table_name"."column_name"')}
to exclude data with the selected “Dropdown” values:
{DROPDOWN_NAME.NOT_IN('"table_name"."column_name"')}
Replace DROPDOWN_NAME
with your control's name, and make sure to wrap the table-column reference in single quotes.
Here’s an example of how someone might get the total number of Jira issues for all project types selected in the “Dropdown” control:
SELECT COUNT(DISTINCT "Jira Issue"."issue_id") AS "Count of distinct Issue Id"
FROM "jira _issue" AS "Jira Issue"
INNER JOIN "jira_project" AS "Jira Project"
ON "Jira Project"."project_id" = "Jira Issue"."project_id"
WHERE {DROPDOWN_NAME.IN('"Jira Project"."project_type"')}
Conversely, here’s an example of how someone might get the total number of Jira issues for all project types not selected in the “Dropdown” control:
SELECT COUNT(DISTINCT "Jira Issue"."issue_id") AS "Count of distinct Issue Id"
FROM "jira _issue" AS "Jira Issue"
INNER JOIN "jira_project" AS "Jira Project"
ON "Jira Project"."project_id" = "Jira Issue"."project_id"
WHERE {DROPDOWN_NAME.NOT_IN('"Jira Project"."project_type"')}