Skip to main content
Skip table of contents

Filtering report results

Reporting Cloud app allows you to filter your report results in two ways.

Filtering your raw fetched results

You can use CQL (Confluence Query Language) in the Query section as a starting point to filter results. 


Here are some example queries:

 Query  resultCQL
Matches all pages within the "KBASE" space.  type=page and space="KBASE"

Matches all pages within the current space.  

type=page and space=currentSpace()

Matches all comments within the "KBASE" space and on the current page. 

type=page and space=currentSpace() and content=currentPage()

Matches all pages with the label "profile_page".type=page and label="profile_page"
Matches all pages created by the current user.type=page and creator=currentUser()
Matches all pages with the label "profile_page" which were modified after the start of this year.type=page and label="profile_page" and lastModified > startOfYear()


CQL, which is similar to JQL, is a complete query language that allows you to filter your query data in various ways. You can refer to Atlassian's CQL documentation for the comprehensive guide. (warning) Development teams introduced currentPage() and currentSpace() specifically for Reporting Cloud. These are not available as a generic CQL query.

Fetching all results

By default, Reporting will only return the first 200 results from a query. This is done for performance reasons. There is a Fetch all results option below the query box, but be aware that it may significantly increase reports' loading times if you enable this.

Auto-complete CQL queries

Reporting includes an auto-complete feature to help you build usable CQL queries. You can click in the query box and select the suggested query terms from the dropdown.

See the CQL query example below on generating a report on all the pages in the current space, ordered by the last modified date. 

CODE
type=page AND space=currentSpace() order by lastmodified

You could type the whole query or use the auto-complete feature, as shown below.

Advanced filtering for your final report results

Reporting allows you to apply advanced filters using  JMESPath. JMESPath is a JSON manipulation tool that will enable you to transform further and filter results to provide better control over the final results and how they are formatted and shown on your report.

To add a JMESPath filter, go to the Filters section and click Add. Key in or paste the JMESPath string. You can also add more than one filter, and filters are applied from top to bottom.

You can change the order of filters by dragging them up or down. Then click Apply to use the filters.

In the example below, two filters are being used.

JMESPath is geared towards more advanced users and requires report builders to understand and familiarize themselves with the syntax. We have documented a few commonly used filters below.

Filter resultJMESPath

Show only the first "5" results

[:5]
Only display the second result from the return CQL[[1]]
The result should match the exact title of 'Product catalog'[?content.title=='Product catalog']
The title should start with the word "Product"[?starts_with(content.title, 'Product')]
The content body must contain the text 'Product' (make sure 'body.storage' is added into your expansions)[?contains(content.body.storage.value, 'Product')]
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.