How can I calculate percentage of non numerical fields?
e.g: look at this table
result: 50% True, 50% False
Hi @me ,
You may try the Table Filter and Charts for Confluence app.
Go to the Pivot macro settings and count the number of different statuses:
And visualize the percentage with the help of the Chart from Table macro:
Hope this may help your case.
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
status1 50% True, 50% False
status2 50% True, 50% False
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.
Hi @me , so, here is your page in the edit mode:
Wrap your source table in the Table Excerpt macro:
And reuse it twice with the help of the Table Excerpt Include macros (pay attention to the Excerpt name, it shouldn't be misspelled):
Then 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:
Now go to the second Table Toolbox macro and repeat all the actions but for the Status 2 column:
As a result, your published page will look as on the screenshot below:
Hope that I've cleared the algorithm for you.
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
Hi @me ,
Try the following steps: wrap your tables into the Table Excerpt macros and give a different name to each table.
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:
The next step is to merge your tables into one table using the Table Transformer macro:
The remaining steps are well-known to you: aggregate your data and visualize it.
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.
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
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
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: