How to sort the columns?
Asked by Alwin Bauer:

*This question is in reference to Atlassian Documentation: [Page Properties Report Macro](https://confluence.atlassian.com/pages/viewpage.action?pageId=186089616)*

By default the macro sorts the columns in alphabetical order, but this is only rarely correct. How to sort the columns?


Answers:
author: Andrey Khaneev _StiltSoft_
body: You can use [Table Filter](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=cloud&tab=overview) macro to set [default sorting](https://docs.stiltsoft.com/display/TableFilter/Managing+Look+of+the+Table+and+Filtration+Pane#ManagingLookoftheTableandFiltrationPane-Applyingthedefaultsortingordertocolumns): it works with Status macro as well and it is possible to sort on multiple columns at once.


author: Anne EQS
body: Use the param '**Columns to show**' (in the macro display options of the Page Properties Report macro) for sorting the order of the columns. When you add all the column headers in teh required order there, the table is displayed accordingly.

In your case specify:

Title, Curren status, Team, Deadline

or

Title, Team, Curren status, Deadline

comments: author: Milo Grika
body: Except for the Title column which still comes first regardless.


author: Menno Bieringa
body: Actually, this thing really doesn't seem to work.  
Not with even with plain text content.

I'm using the Confluence Cloud version.  
I've specified the columns explicitly, which works  
I've specified the sorting column (which is 1 word, no spaces or anything tricky) but no love.

comments: author: Wolfgang Hafenscher
body: Also getting really frustrated with that. We are not able to sort by column "Status" on the initial page load (see sample image below for our configuration and table preview).

When clicking the headers afterwards, sorting works perfectly fine, just not on the initial page load. Which is really annoying as this page is supposed to give a quick overview of different pages sorted by state.

![\[Untitled\].png](https://community.atlassian.com/t5/image/serverpage/image-id/36401i0AB45FF6286C9E97/image-size/large?v=v2&px=999 "[Untitled].png")

Edit: Seems to be an open bug since more than two years <https://jira.atlassian.com/browse/CONFSERVER-39322>  
Please comment on the linked jira item to increase traction.


author: Rachel Robins
body: Hi Alabaue, I'm not sure exactly what you are trying to sort, or the problem you're experiencing in your macro - but there are a few things to consider.

There are two ways to sort columns in the Page Properties Report macro. You can define a column to sort by (in the macro's Sort by field), and sort this ascending or descending (using the Reverse sort checkbox) - this sets the default sort when the page is displayed, or you can sort the macro by clicking the column headings.

If the Page Properties Report macro is showing 10 items from a possible 15, clicking the column headings to sort the columns will only sort the 10 items that are visible, not all returned items.

If you want to be able to sort by a date column, using date lozenges in your pages will mean your dates sort correctly (type // to trigger the date picker).

Hope this helps

comments: author: Alwin Bauer
body: Hi Rachel, I would like to sort the columns in the table. In the example, shown in the documentation, it is 'Title' (given as the first column), 'Curren status', 'Deadline', 'Team'. How do you do it, when you need it in the order: 'Title' (given as the first column), 'Curren status', 'Team', 'Deadline' or 'Title' (given as the first column), 'Team', 'Curren status', 'Deadline'Thank you for your inputs.


author: Rachel Robins
body: Ah, unfortunately the macro doesn't allow you to define multiple columns to sort by - just one.


author: Dominik Meinhold
body: Awesome, thanks for the tip!

It might be worth it to add this to the help page.


Tags: page-property