The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use multiple queries in a Confluence table

Jitendra Shembekar
Contributor
May 22, 2023

I am trying to solve below problem

- Trying to calculate % of closed defects automatically

(i.e. 70/96 = 73% in the below example)

3.JPG

@Stiltsoft support helped me in getting numbers separated from the text (i.e. separating 70 from '70 issues') and the sql query to perform arithmetic calculation in one of my previous questions.

I am trying to use both of these sql queries in table transformer macro but it is not working.

Can anyone help here.

(@Stiltsoft support - as usual if you may help here)   

Thanks in advance!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

4 votes
Answer accepted
Katerina Rudkovskaya _Stiltsoft_
Atlassian Partner
May 22, 2023

Hi @Jitendra Shembekar,

Please follow these steps:

Mon 6-1.png

SELECT *,
ROUND('Closed so far'*100/'Total problems', 0) + "%" AS 'Percent'
FROM
(SELECT 'Total problems'->split(" ")->0 AS 'Total problems',
'Closed so far'->split(" ")->0 AS 'Closed so far'
FROM T*)

Mon 6-2.png

Note that here the result table was transposed for better understanding (it is optional, of course):

Mon 6-3.png

Hope this helps your case.

Jitendra Shembekar
Contributor
May 22, 2023

Thank you so much @Katerina Rudkovskaya _Stiltsoft_ for your quick help :)

This works perfectly. You guys are pro!

 

I modified your query little bit to see my table like below.

4.JPG

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events