Reporting counting number of occurances
Asked by Steve Boydon:

Hi  

<br />

I never really got on with pivot tables and charts in Excel and it seems to have carried over to Confluence  

I need to create some pretty basic reports.  

I have the following  

\<ac:structured-macro ac:name="report-table"\> \<ac:parameter ac:name="injected"\>true\</ac:parameter\>  
\<ac:rich-text-body\>  
\<ac:structured-macro ac:name="grouping-reporter"\>  
\<ac:parameter ac:name="as"\>Compliance Status\</ac:parameter\>  
\<ac:parameter ac:name=""\>data:evidence-compliance-status\</ac:parameter\>  
\<ac:rich-text-body\>  
\<ac:structured-macro ac:name="local-reporter"\>  
\<ac:parameter ac:name="source"\>Control Evidence\</ac:parameter\>  
\<ac:parameter ac:name=""\>page:children\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\> \</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<ac:structured-macro ac:name="report-column"\>  
\<ac:parameter ac:name="title"\>Compliance Status\</ac:parameter\>  
\<ac:parameter ac:name="width"\>120px\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>%grouped:Compliance Status%\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<ac:structured-macro ac:name="report-column"\>  
\<ac:parameter ac:name="title"\>Number\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>%Compliance Status \&gt; count%\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\<ac:structured-macro ac:name="report-empty"\>  
\<ac:rich-text-body\>  
\<ac:structured-macro ac:name="column"\>  
\<ac:parameter ac:name="width"\>270px\</ac:parameter\>  
\<ac:rich-text-body\>  
\<ac:structured-macro ac:name="hinchpanel"\>  
\<ac:parameter ac:name="color"\>red\</ac:parameter\>  
\<ac:parameter ac:name="width"\>90\</ac:parameter\>  
\<ac:rich-text-body\>  
\<p\>No Evidence yet\</p\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  
\</ac:rich-text-body\>  
\</ac:structured-macro\>  

<br />

Basically a report table that does a lookup across a bunch of pages and counts the number of compliance statuses for each value.  

So i get a table with 2 columns the first one gives me each instance of compliance status. What i now need to do is count how many for the number column.  

I'm guessing I've either missed off some form of grouping stat or the line  

%Compliance Status \> count%  

is somewhat wrong.  

For the life of me I'm stumped  

Steve


Answers:
author: JK Kim
body: .


author: Steve Boydon
body: Thanks for the response Andrey. Unfortunately the organisation I am working for are not currently purchasing additional addons.

To add to this Service Rocket are taking down their old support forum, so historic 'answers' will go.

Steve


author: Andrey Khaneev _StiltSoft_
body: Hi Steve,

Not sure Reporting add-on can build a pivot table. But you can wrap it with [Pivot Table](https://docs.stiltsoft.com/display/TableFilter/How+to+use+Pivot+table+macro) macro from [Table Filter and Charts](https://marketplace.atlassian.com/plugins/com.stiltsoft.confluence.plugin.tablefilter.tablefilter/server/overview) add-on, it is compatible with reporting macros.

comments: author: JK Kim
body: Can automatically fill the the bottom row ? (count)  
It adds the specific each text.

|-------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|
| name  | **2/01(** **?)** | **2/02(** **?)** | **2/03(** **?)** | **2/04(** **?)** | **2/05(** **?)** | **2/15(** **?)** | **2/16(** **?)** | **2/17(** **?)** | **2/18(** **?)** | **2/19(** **?)** |
| A     | -                | ??               | -                | -                | ??               | -                | -                | -                | -                | -                |
| B     | ??               | -                | ??               | -                | ??               | ??               | -                | ??               | -                | ??               |
| C     | -                | ??               | -                | ??               | ??               | -                | ??               | ??               | -                | ??               |
| D     | -                | ??               | -                | ??               | ??               | -                | ??               | ??               | -                | -                |
| count | ??:1, -:3        | ??:3 -:1         | ??:1, -:3        | \~               | \~               | \~               | \~               | \~               | \~               | \~               |


author: Katerina Kovriga {Stiltsoft}
body: Hi [@JK Kim](/t5/user/viewprofilepage/user-id/1065232) ,

If you need to count cells with text (not numbers!), it is also possible with the [Table Filter](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Filter+macro) macro.

Wrap your table in the macro body, go to the macro settings -\> Table View -\> Count totals for columns and choose to count not empty cells for any columns you want:

![Tue 1-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/130665iC238D9AA0BEF5F66/image-size/large?v=v2&px=999 "Tue 1-1.png")

Hope this helps your case.


Tags: reporting-plugin