Once you have installed theĀ DataView macro and the DataViewResults macro, you will be able to sort the data by selecting the 'up' or 'down' arrows at the top of any column:

This works like the sort function in any Confluence table