Sorting Pivot Tables by data

Hi,

In LibreOffice Calc I’ve got a sheet with 4 columns: Name, Date, Amount, Method of Payment.
On this sheet I log each time a client pays me.

I have generated a pivot table with two colums, the first one with the name of the client, and the second with the sum of Payment, with the idea of tracking which clients bring in the highest revenue.

The pivot table gets sorted alphabetically by the name of the clients, and when I click on the arrow above that to sort, the options are to re-arrange ascending, descending and so on, but always based on the name of the clients.

What I want is for it to sort descending, based on the values in the sum of Payments column, so the first position is the client who has brought in the highest revenue, the second position is the second highest revenue and so on.

I’ve found that if I select the data and then go to the Data>sort… I can do it there, but the borders are all messed up and every time I update the pivot table after adding more data to my sheet, it goes back to the default order based on the client names.

Is there any solution for the pivot table itself to order based on the sum of payments column?

Thank you!

Pivot>right-click>Properties…
Double-click the row field (clients), then [Options…]

That worked like a charm, thank you! :slight_smile: