To sort an Excel PivotChart’s bar categories in ascending order, sort the matching field in its PivotTable: open the field’s drop-down arrow and choose Sort A to Z. To sort by the numbers represented by the bars instead, use the PivotTable’s value-based sort; the chart follows the PivotTable’s order.
What ascending order means in a PivotChart
“Ascending” can mean two different things in a bar chart. It may refer to the category labels, such as arranging product names alphabetically from A to Z, or to the summarized values, such as ordering regions from the smallest sales total to the largest. Decide which meaning you want before sorting. Alphabetical order is useful for finding a label, while value order is usually better for comparing performance.
A PivotChart is connected to a PivotTable, so its categories and values are controlled by the PivotTable fields and their arrangement. Sorting the chart’s source worksheet rows is not the same as sorting the PivotTable. The chart generally reflects the PivotTable’s current category sequence, including its sort order and filters.
Sort category labels from A to Z
- Click a cell in the PivotTable’s row-label field that supplies the chart categories. For example, click a city name if the bars represent sales by city.
- Click the drop-down arrow beside the field’s Row Labels heading. If the field name appears instead of Row Labels, use its arrow.
- Choose Sort A to Z. For text categories this sorts alphabetically; for dates or numbers, Excel uses the corresponding ascending order.
- Check the PivotChart. Its categories should now follow the PivotTable’s sorted sequence.
You can also right-click a category label in the PivotTable and choose Sort, then an ascending option. The field drop-down is often easier to find when the chart itself is selected. If the chart displays PivotChart field buttons, you may be able to open the category field’s button there; otherwise, make the change directly in the PivotTable.
Sort bars by their summarized values
If you want the smallest bar first and the largest last, sort by the value field rather than by the category name. For example, a PivotTable with Region in Rows and Sum of Revenue in Values can be sorted by Sum of Revenue. This creates a ranking based on the aggregation currently shown—not on the order of the original records.
- In the PivotTable, click a number in the value column used by the chart, such as a revenue total.
- Right-click and choose Sort, then Sort Smallest to Largest. If that option is not available or you need to specify the field, open the row field’s drop-down and choose More Sort Options.
- In the sort options, select ascending order and choose the relevant value field in the by list, such as Sum of Revenue. Confirm the dialog.
- Review the chart to confirm that the category sequence now follows the totals.
Sorting by values can be misleading if you choose the wrong measure. A chart with both Sum of Revenue and Sum of Units may offer more than one value field for sorting. Select the measure that the bars are meant to communicate. If the PivotTable uses a calculation such as average or count, the sort is based on that calculation, not necessarily on a raw source column.
Make ascending order read from top to bottom
Even after the PivotTable is sorted ascending, a horizontal bar chart may appear to run in the opposite direction when you read from the top bar downward. This is because Excel’s category-axis display order can place the first PivotTable item at the bottom of a bar chart. The underlying order and the visual top-to-bottom order are related, but they are not always presented in the direction a reader expects.
To adjust the display, right-click the chart’s category axis—the axis listing the names—and choose Format Axis. In the Format Axis pane, open Axis Options and change Categories in reverse order. The exact result depends on the chart’s current setting, so check the labels after toggling it. Reversing the axis changes how categories are displayed; it does not change the PivotTable’s actual sort order.
Excel may move the value axis to the other side when category order is reversed. If that makes the chart harder to read, use the axis options to adjust where the horizontal value axis crosses the category axis. The option may be labeled Horizontal axis crosses; choosing the setting appropriate to the maximum category can restore the value axis to the expected side. Review the chart after making this adjustment.
Why sorting the source data may not work
A PivotTable summarizes a source range or data model. Its displayed categories are organized by the PivotTable, so sorting rows in the source worksheet does not reliably impose a new order on the PivotChart. The PivotTable can retain its own sort setting, and a refresh may rebuild the summary from the source data without adopting the source’s row sequence.
For predictable results, sort the PivotTable field itself. If you changed source labels or values and need the summary updated, select the PivotTable and choose PivotTable Analyze > Refresh. Refresh updates the PivotTable from its source; it is different from sorting. Depending on the existing field sort settings, the displayed order may remain sorted by labels or values after refresh.
Also check whether the field is manually ordered. If you dragged individual items into a custom sequence, Excel may preserve that manual arrangement rather than applying the sort you expected. Apply the intended ascending sort again from the field menu. Filters and slicers can hide categories, so an apparently incomplete sequence may simply reflect the current filter selection.
Grouped dates, numbers, and multiple fields
Ascending dates normally run from earliest to latest, and numeric categories normally run from the smallest number to the largest. Text that looks numeric, however, may sort alphabetically: for example, text labels “1,” “10,” and “2” can appear in that order rather than numerical order. If that happens, check whether the source values are stored as text and correct the source data if a true numeric sort is required.
Date grouping adds another layer. A PivotTable may show years, quarters, or months instead of individual dates. Sorting the displayed grouped field orders those visible groups; it does not necessarily expose or sort every underlying date as a separate category. If months are shown as text labels, use a date grouping or a suitable date field when chronological order matters, rather than assuming that month names will sort in calendar order alphabetically.
When the PivotTable has more than one field in the Rows area, the chart can show nested categories. A sort applies within the relevant field’s groups, and the result may not be a single global ranking across all visible items. For a flat ranking, use one category field in Rows or restructure the PivotTable so the value-based sort applies to the level you intend to compare.
Keep the chart clear after sorting
Sorting can make a chart easier to scan, but it can also expose design issues. A long list of categories may still be difficult to read, and reversing the axis may put the most important item at the bottom or top depending on your goal. Consider whether the chart should emphasize a progression, a rank, or a familiar alphabetical lookup.
- Use a value sort when the purpose is to compare high and low results.
- Use an alphabetical or chronological sort when readers need to locate a category or follow time.
- Check that the chart title and axis labels identify the measure and category clearly.
- After filtering, refreshing, or changing fields, verify that the visible order still supports the point of the chart.
PivotChart field buttons can make a chart look crowded. In Excel for Microsoft 365 on Windows, select the chart and use PivotChart Analyze > Field Buttons > Hide All to hide them. Hiding these buttons does not remove the PivotChart’s connection to its PivotTable; you can still sort through the PivotTable.
Excel for Mac and Excel for the web
The core approach is the same in Excel for Mac: sort the category field in the associated PivotTable, either alphabetically or by a value field. Ribbon placement and the appearance of contextual menus can vary by release, so use the field drop-down or the right-click Sort options if the Windows ribbon path is not displayed exactly the same way. Axis formatting is also available through the chart’s formatting controls, although pane labels can differ slightly.
Excel for the web may present fewer chart and PivotTable controls than desktop Excel, depending on the feature and workbook. If you cannot find the required value-sort or axis-order setting in the browser, open the workbook in the desktop app and make the change there. The workbook’s PivotTable and chart remain linked when opened in the desktop version.
Frequently Asked Questions
How do I sort an Excel PivotChart from smallest to largest?
In its PivotTable, right-click a value in the measure column and choose Sort > Sort Smallest to Largest. If needed, use More Sort Options and specify the value field to sort by.
Why does my ascending bar chart look descending?
A horizontal bar chart can display the first category at the bottom. Sort the PivotTable as intended, then use Format Axis > Axis Options > Categories in reverse order to change the visual direction.
Can I sort a PivotChart without sorting its PivotTable?
Not as an independent category order in the usual PivotChart workflow. The chart follows its PivotTable’s field arrangement, so change the sort in the PivotTable or through the chart’s PivotChart field controls.
Why is Sort Smallest to Largest missing?
You may have selected a category label instead of a value, or the field may be manually ordered or arranged in a way that does not expose that command. Select a number in the relevant value column, or open the row field’s drop-down and check More Sort Options.
Will refreshing a PivotTable erase its ascending sort?
Not necessarily. A refresh updates the summary from the source, while the PivotTable’s sort setting often remains in effect. Check the order after refreshing, especially if the field arrangement or source data has changed.
Choosing the right sort
For an alphabetical category list, use Sort A to Z; for a ranked bar chart, sort by the relevant summarized value in ascending order. Then inspect the horizontal category axis to make sure the visual top-to-bottom direction matches your intention. Keeping those two decisions separate—PivotTable sort and chart-axis display order—makes it much easier to diagnose why an Excel PivotChart appears out of order.
Related
- Excel Page Breaks for Printing: How to Add Them Easily
- Excel Dropdown List: How to Select Multiple Items
- Excel 2016: How to Freeze Panes and Keep Headers Visible
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Pivot Table Max Not Working? Causes, Checks, and FixesIf Max is not working in an Excel PivotTable, open the value field’s settings and choose Summarize Values…
- Excel Combo Chart Secondary Axis: Setup and TipsTo put a series on a secondary axis in an Excel combo chart, select the chart, choose Chart…
- Gauge Chart in Excel: Build and Format OneTo make a gauge chart in Excel for Microsoft 365 on Windows, create a doughnut chart from three…
- Generate an Org Chart in PowerPoint: Steps and TipsTo generate an org chart in PowerPoint for Microsoft 365 on Windows, select Insert > SmartArt > Hierarchy,…
- Excel Number Line Chart: Create and Format a Dot PlotExcel has no chart type named Number Line, but you can make one with an XY (Scatter) chart:…
- How to Add a Trendline in an Excel GraphTo put a trendline in an Excel graph, select the chart, choose Chart Design > Add Chart Element…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.