Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create a summarize table based on columns of a table in confluence? Edited

I have a table like this 

table_a.PNG

and I want a small summarized pivot table like shown below based on the above table :

table_b.PNG  

How we can achieve this via confluence ? Is there any macro for this ?

1 answer

1 accepted

Hi @Ross ,

There are no such macros out-of-the-box, you'll need some additional apps to complete your case.

In this thread I suggested using our app - Table Filter and Charts for Confluence (it seems that it was also your question judging by the username).

And here is another bunch of screenshots for you: wrap your table into the Table Transformer macro.

Mon 2-1.png

Mon 2-2.png

SELECT "Summary" AS '',
SUM(IF(T1.'Column A' = "Yes", 1, 0)) AS 'Column A Yes',
SUM(IF(T1.'Column A' = "No", 1, 0)) AS 'Column A No',
SUM(IF(T1.'Column B' = "Yes", 1, 0)) AS 'Column B Yes',
SUM(IF(T1.'Column B' = "No", 1, 0)) AS 'Column B No',
SUM(IF(T1.'Column C' = "Yes", 1, 0)) AS 'Column C Yes',
SUM(IF(T1.'Column C' = "No", 1, 0)) AS 'Column C No'
FROM T1

Mon 2-3.png

Mon 2-4.png

Hope this helps.

Excellent answer @Katerina Kovriga _Stiltsoft_ . Thank you very much.

@Ross  And here is another more precise SQL query for your case:

SELECT "Yes" AS 'Count',
SUM(IF(T1.'Column A' = "Yes", 1, 0)) AS 'Column A',
SUM(IF(T1.'Column B' = "Yes", 1, 0)) AS 'Column B',
SUM(IF(T1.'Column C' = "Yes", 1, 0)) AS 'Column C'
FROM T1
UNION ALL CORRESPONDING
SELECT "No" AS 'Count',
SUM(IF(T1.'Column A' = "No", 1, 0)) AS 'Column A',
SUM(IF(T1.'Column B' = "No", 1, 0)) AS 'Column B',
SUM(IF(T1.'Column C' = "No", 1, 0)) AS 'Column C'
FROM T1

Mon 2-5.png

Now you don't need to transpose tables and your result table is neat and easy to read.

Like Ross likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

150 views 2 5
Read article

Community Events

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

Events near you