Fix Power Pivot PivotTable Sorting in Excel
Question details
The user needs to sort values in a PivotTable created from Power Pivot in the expected ascending or descending order.

- Product
- Microsoft Excel Power Pivot
- Device & OS
- not provided
- Scenario
- Sorting a field or value in a PivotTable based on the Excel Data Model.
- Observed behavior
- Values do not appear in the expected ascending or descending order.
Identify whether you need to sort the PivotTable labels, a calculated value, or a column in the underlying Data Model. Check which field and values should determine the order before changing sort settings.
Sort the PivotTable by the intended field or value
Use this when the PivotTable is displayed but its labels or totals are in the wrong order.
In the PivotTable, select a label in the row or column field you want to sort, or select a value in the measure column whose totals should determine the order.
Right-click the selected cell, choose Sort, and select Smallest to Largest or Largest to Smallest. For text labels, choose the corresponding A to Z or Z to A option.
Open the field's drop-down menu and choose More Sort Options. Select ascending or descending order and check that the intended field or value is selected instead of a manual order.
If items remain ordered within groups, right-click a grouped label to inspect its grouping. Choose Ungroup only if you no longer need that grouping, then sort again.

Check the Data Model and refresh the PivotTable
Use this when numbers sort like text or a model-level sort order overrides the expected label order.
Work with spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for everyday spreadsheet work. Its Excel file compatibility helps you move between office suites, though it does not fix Excel Power Pivot or replace its Data Model features.

Frequently Asked Questions
Why are numbers sorting in the wrong order?
The values may be stored as text, which can produce alphabetical rather than numeric order. Open Power Pivot > Manage, select the source column, and check its data type. Correct the type or source values, then use Data > Refresh All.
How do I sort PivotTable labels by a total?
Select a value in the relevant total or measure column, right-click it, and choose Sort > Smallest to Largest or Largest to Smallest. If needed, open the field menu and use More Sort Options to check the sort field.
Why does my PivotTable sort only within groups?
The selected field may be nested inside a grouped field, so Excel sorts items within each group. Select the field at the level you want to sort, or right-click a grouped label and choose Ungroup if the grouping is no longer needed.
Can a Data Model column control the order of PivotTable labels?
Yes. In Power Pivot > Manage, select the label column and open Home > Sort by Column to inspect or change its model-level sort column. Each distinct label must have a consistent corresponding sort value.




