I have one big table that I want to display counts of:
I was able to populate Table A with three macros (see screenshot). But this solution is heavy and takes a long time to load as I have many other macros on the page.
Any lightweight solution to look like Table B? Please note, I do not have TRANSWIKI.
Hi @Leona ,
SELECT *, 'Open'/'All'*100 AS '% of Completion'
FROM (SELECT SUM(IF(T1.'Status' = "To Do", 1, 0)) AS 'Open',
SUM(IF('Status' IN ("To Do", "In Progress", "Done", "Answered"), 1, 0)) AS 'All'
To get a vertical table instead of the horizontal one go to the "Settings" tab of the Table Transformer macro and check the "Transpose result table" option.
Hope this helps your case.
And pay attention to the obtained results:
SELECT SUM(IF(T1.'Status' = "To Do", 1, 0)) AS 'Open' FROM T1
equals to the
SELECT COUNT('Status' = "To Do") AS 'Open' FROM T1 WHERE T1.'Status' = "To Do"
The simple changing of the function's name can lead to incorrect results (your conditions won't be taken into consideration).
You can find more use cases here.
The performance depends more on the number of issues that are returned by your Jira Issues macro and the number of other macros on top.
Here we have one Table Transformer, so only one SQL query will be applied to the source table. And the SUM function just makes the initial SQL query look more neat and easy-to-read.
Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋♀️ ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events