Confluence Cloud
I have 3 Confluence "sprint performance" tables with data pasted from Jira for sprint stories that are complete, incomplete, or removed, respectively. These are for multiple engagements, so there are multiple sets of these 3 tables, 1 set per engagement.
I am creating a dashboard page that rolls up all this information using Table Excerpt Include. I then use Table Transformer to join these tables using the "Engagement" field.
Dashboard goal is to show one row for each engagement, with the total count of stories (based on Key field), and sum of Story Points. I am struggling with the SQL to pull only the total values for each engagement's "sprint performance" table.
A segment of my SQL, and one set of sprint tables, and desired dashboard table are below. I know I can use the CASE statement to locate the total line for each table, but I don't know how to pick up the Key count total and the Story Points sum and put on one row with the engagement name.
I've struggled with this for too long, so time to call in the experts. Thanks in advance for any suggestions.
SELECT
T1.'Engagement',
CASE
WHEN T1.'Engagement' = "Total"
THEN ???
END
AS 'Complete Stories',
CASE
WHEN T2.'Engagement' = "Total"
THEN ???
END
AS 'Incomplete Stories',
CASE
WHEN T3.'Engagement' = "Total"
THEN ???
END
AS 'Removed Stories',
FROM T1 OUTER JOIN T* ON T1.'Engagement' = T*.'Engagement'
| Engagement | Delivery | Key | Story Points |
| Project 1 | Complete | D-12344 | 2 |
| Project 1 | Complete | D-12345 | 3 |
| Project 1 | Complete | D-12344 | 2 |
| Project 1 | Complete | D-12345 | 3 |
| Total | | 4 | 10 |
| | | | |
| Engagement | Delivery | Key | Story Points |
| Project 1 | Incomplete | D-24162 | 3 |
| Total | | 1 | 3 |
| | | | |
| Engagement | Delivery | Key | Story Points |
| Project 1 | Removed | D-23455 | 5 |
| Project 1 | Removed | D-23457 | 3 |
| Total | | 2 | 8 |
| Engagement | Complete Stories | Incomplete Stories | Removed Stories | Complete Story Points | Incomplete Story Points | Removed Story Points |
| Project1 | 4 | 1 | 2 | 10 | 3 | 8 |
| Project n | n | n | n | n | n | n |