---
title: "Document Stats Report macro"
canonical: "https://support.appfire.com/space/CDALS/649659140/Document%20Stats%20Report%20macro"
format: markdown
---
> Macro (aura-html)

> Macro (excerpt)
> 
> Displays on a page the count for content in each workflow state

## Overview

## Permissions

Anyone can see this report.

![image](media://6e2a9e70-cc45-4505-ab82-b5f4b1ae6926)

## Adding the report

To add the report to a page, choose the **Document Stats Report** macro.

In the editor, either

- choose **Insert   **> Macro (inline-media-image)

** → Other Macros → Reporting → Document Stats Report **
- or type **{Document Stats ...**  on the page and select** {document-stats-report}**
- choose**  Edit**

![cdac_documentstats_editoption.png](media://f347a2a9-6ae3-4fa4-8aa0-d89b2213e011)

- choose report filters and the display column settings

![image](media://10f440b0-6065-4dd3-81a3-e488b037bb1b)

> ✅ The document-stats-report macro can be used with the Confluence chart macro to graphically display the count.

## Customizing the report

Edit the **Document Stats report** macro to customize the report by

You can choose to filter the state count for the content by

- label(s)
- parent
- space(s) using the space key

If you add multiple labels, the report displays the state information for content with each label. If you want to display information for content that must have all the specified labels, add the **&** (the and ampersand) operator in front of the first label in the list

You can customize the macro to display one or more states.

> 📝 The report also includes the state count for content if the workflow history was retained when the workflow was removed.

### Customize the displayed columns

### Filter the report

In the macro editor, select options to filter the report. These include options to filter by state, space key, workflow, label, or parent page - see table below).

## Report filters> Macro (anchor)



The filters are listed alphabetically in the macro editor.

| **Setting** | **Default** | **Notes** | **Version** |
| --- | --- | --- | --- |
| **Label** | *blank* | Should the report be filtered by content label(s)?<br>- leave empty to include all content
- list one label name to filter to a specific label
- list multiple label names, separated by commas, to filter to content with any of those labels<br>Using a list of labels, you can prefix the list with the  **&**  (the and ampersand) to require that the content has all the labels. O*therwise, it reports pages containing any of the listed labels.* |  |
| **Parent page** | *blank* | Report limited to child pages only of the space home page or specified page.<br>- leave empty to include all content in the space (does not include the home page as this is the default parent)
- specify a page title to include only its child pages |  |
| **Ancestor page** | blank | The report is limited to the descendant pages of the specified page.<br>- use **@self** to report on the descendant pages of the current page
- specify a page title to include only its descendant pages<br>> 📝 If specifying an ancestor page, you cannot list multiple space keys. The report defaults to the descendant pages of the added page. | v2.4.0+ [DATA CENTER] |
| **Spaces** | *blank* | Which space(s) are in the report?<br>- when specifying a parent page, you cannot list multiple space keys<br>The report defaults to the child pages of the added parent page. |  |
| **State(s)** | *blank* | Should the report be filtered to a specific state or state(s)?<br>A comma-separated list of workflows to be displayed. The count for all the content in the states in the scope of the macro editor settings is displayed.<br>- leave empty to include all content in all states
- limit report by listing one or more state names in a comma-separated list<br>The report includes the state count for content where the workflow was removed, but the workflow history was retained. |  |
| **Workflow** | *blank* | Should the report be filtered to a specific workflow(s)?<br>A comma-separated list of workflows to be displayed.<br>- leave empty to include all content in all states in all workflows
- limit report data by listing one or more workflow titles in a comma-separated list<br>If left empty, the report consists of the state count for content where the workflow was removed, but the workflow history was retained. |  |