How do I get a control to connect to a chart when it won't do so automatically and I don't know SQL?

Dylan Demery
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2024

I used the Atlassian AI to write a query, then copied that query code into a new chart. Then I tried to add a control but it won't connect to the chart and I don't know enough SQL to add a control in SQL. How can I figure this out?

1 answer

0 votes
Nayan Pandey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2024

Hello Dylan!

I am Nayan from the Atlassian Analytics team, happy to help!

The control variables need to be added to the where clause in your SQL query. Here is an example of how to add a calendar control to charts in SQL mode:

SELECT COUNT(DISTINCT `Issue`.`issue_id`) AS `Count of unique Issue ID`
FROM `jira_issue` AS `Issue`
WHERE `Issue`.`created_at` BETWEEN {CALENDAR_NAME.START} AND {CALENDAR_NAME.END}

Here, {CALENDAR_NAME.START} and {CALENDAR_NAME.END} are the variable controls that we have added in our SQL query to connect the chart with our control. Now, when we select a date range on the Dashboard, these values will be fetched and the chart will be dynamically filtered on the basis on the calendar control values.

I'd also recommend checking the below links to understand how controls work and how to add them to existing charts:
- Documenthttps://support.atlassian.com/analytics/docs/use-variable-controls-for-interactive-filtering/ (Every control type has a section called In a SQL mode query where you can find how to add the controls in SQL mode.)
- Dashboard controls Demo Video https://www.youtube.com/watch?v=dM0cdIqzvxY

Let me know if this helps.

Regards,
Nayan

Dylan Demery
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2024

This definitely helped, Nayan! Thanks so much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events