Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,369
Community Members
 
Community Events
184
Community Groups

calculate percentage of non numerical fields in confluence

Edited

Hi everyone,

How can I calculate percentage of non numerical fields?

e.g: look at this table

1-Jack         True

2-Daniel      False

3-Andro      False

4-Phile        True

result: 50% True, 50% False

2 answers

1 accepted

4 votes
Answer accepted
Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 04, 2021

Hi @me ,

You may try the Table Filter and Charts for Confluence app.

Wrap you table into the Pivot Table macro and then into the Chart from Table macro (for Server/DC) or use the Table Toolbox macro and use Pivot and Chart inside its body for Cloud:

Mon 2-1.pngGo to the Pivot macro settings and count the number of different statuses:

Mon 2-2.pngAnd visualize the percentage with the help of the Chart from Table macro:

Mon 2-3.png

Hope this may help your case.

Hi @Katerina Kovriga _Stiltsoft_ 

Thank you for your answer, but I have issue with this.

It work perfectly for first column, but when I add column 2 aggregate them with each other.

what I expect:

name.           Status1.            Status2. 

1-Jack         True.                   False

2-Daniel      False.                  True

3-Andro      False.                   True

4-Phile        True.                     False

result:

status1 50% True, 50% False

status2 50% True, 50% False

 

Any recommendation?

Thanks,

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 04, 2021

The Pivot Table macro works like a pivot in Excel, so to count and visualize another set of statuses, reuse your original table with the help of the Table Excerpt/Table Excerpt Include macros, wrap your Table Excerpt Include macro in the Pivot Table macro and in the Chart from Table macro and repeat your actions for the Status2 column.

You'll be able to reuse your original table and make different pivots as many times as you need.

To position your result Pie charts neatly on the page, you may use standard Confluence Section and Column macros.

Like me likes this

I try again and again, to do what you mention, but can't get suitable result!

would you please describe with screenshot and more description for add column 2?

Thanks,

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 16, 2021

Hi @me , so, here is your page in the edit mode:

Sat 1-2.pngWrap your source table in the Table Excerpt macro:

Sat 1-3.pngAnd reuse it twice with the help of the Table Excerpt Include macros (pay attention to the Excerpt name, it shouldn't be misspelled):

Sat 1-4.pngThen go to the first Table Toolbox macro and wrap your Excerpt Include macro into the Pivot macro and then into the Chart from Table macro. Here we will visualize our Status 1:

Sat 1-5.pngSat 1-6.pngSat 1-7.pngSat 1-8.pngNow go to the second Table Toolbox macro and repeat all the actions but for the Status 2 column:

Sat 1-9.pngSat 1-10.pngAs a result, your published page will look as on the screenshot below:

Sat 1-1.pngHope that I've cleared the algorithm for you.

Like # people like this

Thank you so much, this is what I exactly want, and I don't use excerpt table correctly,

Now problem solved. :)

 

Thanks,

@Katerina Kovriga _Stiltsoft_

After I've done this another challenge appears, here is the scenario:

 

I have two separate table (table1, table2) on same page,

how can I calculate percentage of "status 1" for "each table separately" and "totally"?

 

Table1) status1 - 50% true 50% false

Table2) status1 - 50% true 50% false

Total)   status1 - 50% true 50% false

 

any idea?

Thanks

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 08, 2021

Hi @me ,

Try the following steps: wrap your tables into the Table Excerpt macros and give a different name to each table.

Thu 5-1.png

Then you'll be able to reuse each table separately and count the status percentage as I've shown in the previous reply.

To count the total status percentage, you need to place (reuse) both of your tables inside the one Table Toolbox macro:

Thu 5-2.png

The next step is to merge your tables into one table using the Table Transformer macro:

Thu 5-3.png

Thu 5-4.png

The remaining steps are well-known to you: aggregate your data and visualize it.

Thu 5-5.png

Thu 5-6.png

By the way, maybe you'll find it interesting to participate into our live Zoom call - we'll be happy to know more about your use cases and ideas as well as show you some extra tips. Please book a suitable time-slot here.

Like me likes this

Table toolbox available for datacenter edition?

 Thanks 

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 27, 2021

No, the Table Toolbox macro is used only for Confluence Cloud to nest several macros.

If you're on Server/Data Center, just wrap your macros one into another directly on the page: Excerpt Include < Transformer < Pivot < Chart.

not work as expected. I add "Excerpt Include" after that add "Transformer", total number that will show correctly (51items) ,but when I add pivot it will just calculate specific part of it (total is 16 items)!

 

here is what happen:

I have totally 51 items, 6 tables

table1 (c1=2,c2=1)

table2 (c1=7,c2=1)

table3 (c1=6,c2=1,c3=2)

table4 (c1=7,c2=3,c3=1)

table5 (c1=6,c2=3,c3=2)

table6 (c1=5,c2=3,c3=1)

 

Result: (total 16 items with below percentage):

6 category1 37.5%
6 category2 37.5%
4 category3 25%

 

Excepted result (total 51 items with below percentage):

33 category1  64.70%
12 category2  23.52%
6 category3   11.76%

 

 

FYI 1: c1 means category1

FYI 2: head column in all tables are same

 

Any idea?

Thanks

 

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 29, 2021

Hi @me ,

It is really strange behavior if everything is collected right with the Transformer macro - the Pivot macro doesn't have any limitations (first 16 rows, first 100 rows, etc.).

So, please raise a support ticket for us to investigate your case closely:

  • check the version of you addon (the current one is 7.6.1)
  • attach screenshots with the macro settings and preview
  • attach Page Storage Format (right upper corner of the page -> ... -> View Storage Format).

Thanks!

Hi

I use 7.6.1

ticket submitted TFCS-431

 

Thanks

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 01, 2021

You will need to write code to do that.

I would do it with a user macro, one that expects your raw data for the table as the input body, does the calculation and then outputs something that you could wrap a table macro around.

would you please share your macro?

Thanks,

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 02, 2021

The stuff I wrote was for a different purpose, and not really applicable here.  It also belongs to a client.

Is it possible modify your code that work on simple example like I mention earlier and post it here?

 

Thanks,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events