How to Manually Sort the X-Axis in an Excel Pivot Chart

Charts & pivot tables · Updated November 3, 2026

How to Manually Sort the X-Axis in an Excel Pivot Chart

To manually sort a PivotChart’s x-axis in Excel for Microsoft 365 on Windows, reorder the category items in the PivotTable that feeds the chart: select a row-label item, set its field to Manual sort if needed, then drag the item into position. The chart follows the PivotTable’s category order; you generally cannot rearrange its PivotChart axis independently. Make sure the chart is connected to the PivotTable you intend to change, and save a copy first if the workbook is important.

What You’ll Need

  • An Excel workbook containing a PivotTable and its associated PivotChart.
  • The category field you want along the chart’s horizontal axis. In a typical PivotChart, that field appears in the PivotTable’s Rows area and in the chart’s Axis (Categories) area.
  • Permission to edit the PivotTable. If the workbook is protected or uses a connection with restricted features, manual reordering may be unavailable.

Step-by-Step

  1. Identify the field that controls the x-axis. Click the PivotChart and look at the chart field buttons or the PivotChart Fields pane. Find the field under Axis (Categories). In the linked PivotTable, this is usually the field in the Rows area. For example, if the axis shows product names, locate the Product field’s labels in the PivotTable. If the chart uses several category fields, the axis may show nested levels; decide which level you want to rearrange.
  2. Locate the corresponding PivotTable. Click inside the PivotTable associated with the chart. If it is not visible, use the chart’s field layout to identify the fields, then find the matching PivotTable in the workbook. Click a category item, not the heading cell, a subtotal, or a value in the Values area. Changing the source item order is what controls the chart order.
  3. Switch the category field to manual sorting if Excel is applying an automatic sort. Right-click one of the category labels in the PivotTable and choose Sort > More Sort Options. In the sort options, select Manual if that choice is shown, then confirm with OK. The exact dialog wording can vary slightly by Excel build. If the field is already manually sorted, you can proceed directly to dragging. An active alphabetical or value-based sort can otherwise move items back into its chosen order.
  4. Drag the first item to its desired position. Select the PivotTable cell containing the item. Move the pointer to the edge of the selected cell until it changes to a four-headed move pointer, then drag the item above or below the other labels. Watch for the insertion line that shows where Excel will place it before releasing the mouse button. If dragging selects cells instead of moving an item, release the mouse, select the label cell again, and start the drag from its border.
  5. Arrange the remaining categories in sequence. Repeat the drag for each item that needs to move. For a custom sequence such as Setup, Review, Approval, Complete, move the items one at a time until their PivotTable labels appear in that order. Check the whole sequence after each move; moving one item changes the positions of the others. You do not need to modify the original source-data rows to set this order.
  6. Check the PivotChart. The chart should update as the PivotTable order changes. Confirm that the x-axis displays the categories in the intended sequence and that the plotted values still correspond to the correct labels. If the chart appears unchanged, check that you edited the PivotTable linked to that chart and that the intended field is in Axis (Categories), not Legend (Series).
  7. Refresh carefully when the source data changes. Right-click the PivotTable and choose Refresh, or use the PivotTable Analyze tab’s refresh command. Then check the category order again, especially if new items have been added. Existing manual ordering may be retained, but newly appearing items need to be placed where you want them. Refreshing updates the PivotTable from its source; it does not provide a separate x-axis sorting control.
  8. Save the workbook after confirming the result. Save once the chart shows the intended sequence. If the file is shared, tell collaborators that the category order is manually arranged. A later automatic sort, field rearrangement, or refresh may affect what they see, so it is useful to record the intended order in a note or in the workbook.

On Excel for Mac, the same underlying method applies: reorder the category items in the associated PivotTable, and the PivotChart follows. Ribbon labels and the exact placement of PivotTable options can differ by Excel version, but use the PivotTable’s sort controls and drag the row-label items rather than trying to drag chart labels. In Excel for the web, PivotTable editing options can be more limited; if manual sorting or item dragging is unavailable, open the workbook in the desktop Excel app.

Common Mistakes

  • Trying to drag the axis labels in the chart. PivotCharts are linked to their PivotTables, and the chart’s category labels normally are not independent objects you can reposition one by one. Change the order in the PivotTable instead.
  • Sorting the wrong field. A chart may have multiple fields, such as Year and Month, on the category axis. Reordering Month will only rearrange months within the relevant higher-level groups; it will not move an entire year. Confirm the field level before dragging.
  • Confusing categories with series. The horizontal axis contains categories; the legend usually identifies series. If you rearrange a field in Legend (Series), you may change legend order without changing the x-axis. Verify the field area in the PivotChart Fields pane.
  • Using an automatic sort after manual ordering. Sorting A to Z or by a value can replace the custom sequence. If the order changes unexpectedly, revisit the field’s sort options and choose Manual before rearranging items again.
  • Dragging the wrong part of a PivotTable. Dragging from the middle of a cell can select a range or move the active-cell selection rather than reorder an item. Start from the edge of the category-label cell and look for the move pointer and insertion indicator.
  • Expecting a manual order to include every future category. A new product, month label, or status introduced by a refresh has no position you have already specified. Check for new labels and move each into the appropriate place.

Tips

  • Write down the target order first. A short list prevents repeated trial and error, particularly when the chart has many categories. Use the same spelling as the PivotTable labels so you can compare the sequence at a glance.
  • Use manual order for a meaningful story. It works well for process stages, priority levels, weekdays in a business-defined sequence, or products arranged by a presentation plan. For numeric or time-based data, a normal ascending or descending sort may be clearer and easier to maintain.
  • Keep the source data tidy. Consistent category names help Excel group items correctly. For example, “In progress” and “In Progress” may be treated as separate labels, creating extra categories to sort.
  • Remember that the chart mirrors the PivotTable. If the PivotTable has subtotals, multiple row fields, or expanded and collapsed groups, the chart may also display grouped or hierarchical categories. Adjust the PivotTable layout if the axis structure, rather than just the item order, is the problem.
  • Check axis direction before changing the item order. If the PivotTable is in the desired order but the chart appears reversed, select the chart axis, open Format Axis, and inspect Categories in reverse order under Axis Options. That setting reverses the displayed direction; it does not create a custom sequence in the PivotTable.
  • Keep a refresh check in your routine. When source data changes, refresh the PivotTable and review the chart. This is especially helpful for dashboards, where a new category can otherwise appear at an unexpected end of the axis.

Troubleshooting

Dragging does nothing or the item snaps back. Confirm that the field is not still sorted automatically. Right-click a label, open Sort > More Sort Options, choose Manual if available, and try again. Also make sure you are dragging an item label within the PivotTable rather than dragging the chart object or a field heading.

The chart does not change after you move a label. Check that the edited PivotTable is the one connected to the chart. A workbook can contain several similar PivotTables. Click the chart and inspect its fields, then compare them with the table you changed. Also verify that the moved field is used for Axis (Categories), rather than only for the legend or a report filter.

The chart order is correct in the table but reversed on screen. Select the horizontal axis and inspect Format Axis > Axis Options. Turn off Categories in reverse order if it is enabled and you want the first PivotTable item displayed at the usual end of the axis. Axis direction and manual item order are separate settings.

Some labels move, but not across the whole chart. When a PivotTable has multiple row fields, Excel may arrange items within their parent groups. For instance, months can be reordered inside each year while the years remain in place. To change the broader grouping, reorder the higher-level field or adjust the field arrangement, not just the lower-level labels.

Manual sorting is unavailable. The workbook may use an OLAP or other external data source, a protected sheet, or a PivotTable configuration that restricts item movement. Check whether the sheet is protected and whether you can edit the PivotTable. If the connection does not permit manual ordering, ask the workbook owner or data administrator about setting the desired order in the source or model. Do not assume that dragging chart labels will bypass that restriction.

A refresh changes the sequence or adds labels in an awkward place. Refresh the PivotTable, identify any new category items, and reposition them in the source PivotTable. If the order must be stable for a frequently refreshed report, consider maintaining a deliberate sort order in the underlying data model or source, where the connection supports it, rather than relying only on a one-time manual arrangement.

Frequently Asked Questions

Can I manually sort a PivotChart’s x-axis without changing the PivotTable?
No, not in the usual PivotChart workflow. The axis order is driven by the linked PivotTable’s category items. Reorder those items, and the chart follows. A regular chart built from a separate range can be arranged differently by changing its source data, but it is not the same as independently sorting a PivotChart.

Can I sort the x-axis by a custom sequence instead of alphabetically?
Yes. Set the field to Manual sort where that option is available, then drag the PivotTable labels into the sequence you want. This is useful for stages or priority bands that have a meaningful order other than A to Z.

Will my manual order survive a PivotTable refresh?
It may, but do not assume that every refresh will preserve the exact presentation. Existing items can retain their arrangement, while new items may need to be placed manually. Review the table and chart after refreshing, particularly when new source categories are introduced.

Can I sort by the values in the chart and then adjust just a few categories?
You can sort a PivotTable by values, but an automatic value sort can conflict with a custom manual sequence. Decide which result matters: a ranking by value or a deliberate category order. If you use manual order, check the sort settings after making changes so an automatic sort does not undo it.

Why does the chart show the right items but in the wrong direction?
The axis may have Categories in reverse order enabled. That reverses how the existing sequence is drawn; it does not change the underlying PivotTable order. Check the axis’s Format Axis options before rearranging all the labels.

Does this work in Excel for the web or on Mac?
The principle is the same on Mac: manually reorder the category items in the associated PivotTable. The ribbon layout may differ. Excel for the web may not expose every desktop PivotTable sorting control, so open the workbook in desktop Excel if you cannot select Manual or drag the items there.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.