---
title: "metadata-table macro"
canonical: "https://support.appfire.com/space/COMALACM/655759844/metadata-table%20macro"
format: markdown
---
> Macro (aura-html)

## <span style="color: #091e42">Overview</span>

<span style="color: #091e42">The </span>`metadata-table`<span style="color: #091e42"> macro </span><span style="color: #333333">produces tabular reports of metadata from matching pages in a two-dimensional matrix format.</span>

<span style="color: #333333">For the two-dimensional matrix, the:</span>

- <span style="color: #333333">**X-axis**</span><span style="color: #333333"> (X Value) is </span><span style="color: #000000">a value that must exist in metadata tags in at least two other pages</span>
- <span style="color: #333333">**Y-axis**</span><span style="color: #333333"> (Y Value) is </span><span style="color: #000000">a value that must exist in metadata tags in at least two other pages</span>

<span style="color: #000000">The cells of the tabular report are the values of the metadata on the pages. Again, this must be present on at least two of the pages.</span>

## Parameters

| Parameter | Required | Default | Notes | Version |
| --- | --- | --- | --- | --- |
| `X Value` | :check_mark: |  | Metadata value name for the x-axis of the tabular data that *must be present in at least two of the pages*. |  |
| `Y Value` | :check_mark: |  | Metadata value name for the y-axis of the tabular data that *must be present* *in at least two of the pages*. |  |
| `Value` | :check_mark: |  | Metadata value name that populates the cell body of the table that must be present in at least two of the pages. |  |
| `Label` |  |  | Page label to filter results of the macro. <span style="color: #000000">Limits the content to only that which has the specified label(s).</span> |  |
| `pages` |  | `children` | <span style="color: #000000">Limits content to a group of pages:</span><br>- `@children`
- `@ancestors`
- `@descendents`
- `@identity` |  |
| `root` |  | `current` | <span style="color: #000000">Use </span>`@self`<span style="color: #000000"> for the current page (the default), </span>`@parent`<span style="color: #000000"> for the parent page, or the name of any page</span> |  |
| `type` |  | `page` | Use `page` or `blog post` to limit the content for the macro table to that type of content |  |
| `function` |  |  | Specifies the value returned for the cell body using each value of the metadata `Value`<br>- `sum`
- `count`
- `min`
- `max`
- `text` |  |

## Usage

To retrieve the values for  of pages with a particular metadata for the table X-axis and Y-axis

- Choose the **Metadata table** macro from the Confluence macro browser:

![image](media://d2b0a11d-6b55-4705-b772-4ce9a7d09d7d)

In the macro editor, add the metadata value names for each of the **X Value**, **Y Value**, and the **Value** parameters. These are used to populate the header row and header column cells of the table 

![image](media://f5af0f68-340a-4296-a80f-65102835184d)

In the example, the macro displays the `Jan Hours` metadata value recorded for each of the **X-Value** `Project Lead` metadata values. The **Y Value** field differentiates the values by the **Name** of the app against which these hours have been recorded.

The macro returns one value for each of the table cells on each page. Using multiple values of the same metadata on a page results in inconsistent results, as only the value is returned for the first metadata encountered. 

## <span style="color: #091e42">Reference markup</span>

```plaintext
{metadata-table:Atlassian Product,Name,Installs}
```

The macro retrieves the `Installs` metadata values for the child pages of the current page.

These are displayed in tabular form for matching pages in a two-dimensional matrix.

The matrix is created using the other metadata names:

- `Product Name` with values of Confluence and Jira
- `Name` with values for each of the apps

![image](media://ca5937f9-5fdb-4e9f-ae14-a36d5b8c6086)

Each entry in the matrix is from the page with the metadata values in the corresponding header row (x-axis) and header column (y-axis) cell of the table.

## Related macros

- [https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655988203](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/655988203)
- [https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656580345](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656580345)

## Related pages

- [Adding, retrieving and displaying metadata](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656675530)