In Excel for Microsoft 365 on Windows, change a PivotChart’s legend order by changing the order of its series in the connected PivotTable: manually rearrange the field items or reorder the value fields. You generally cannot drag legend labels directly in a PivotChart; the chart follows the order maintained by its PivotTable.
What determines a PivotChart’s legend order?
A PivotChart is connected to a PivotTable, and its legend entries represent the chart’s data series. The series might be individual items from a field, such as North, South, and West, or separate measures, such as Revenue and Units. Excel takes their order from the corresponding PivotTable layout and sorting—not from the order of labels you happen to see in the legend.
For example, a PivotTable with Year in the Columns area and Sales in Values may produce a chart with a separate series for each year. The order of the year items in the PivotTable determines the legend order. If the chart instead uses Sales and Profit as separate value fields, their order in the Values area determines which appears first.
This connection is useful because the table and chart stay consistent as you filter or refresh the report. It also explains a common frustration: a PivotChart does not offer the same free-form series rearrangement as an ordinary chart. Changing the chart’s appearance alone will not reliably change the order in its source series.
Change the order of field items
Use this approach when the legend lists items from one field, such as months, product names, regions, or years. The rearrangement changes the field’s item order in the PivotTable and, consequently, in the PivotChart.
- Select the PivotChart, then choose PivotChart Analyze > Field List if the field list is not visible. Identify the field that supplies the legend entries. It is usually in the Legend (Series) area, although the PivotTable’s layout can affect where the corresponding field appears.
- Find the PivotTable connected to the chart. If you are unsure which field items it contains, use the chart’s fields to identify the relevant category and locate the associated table on its worksheet.
- To set a custom order, make sure the field is not being automatically sorted in a way that overrides your arrangement. In the PivotTable, drag an item label to the desired position. For instance, drag Q1, Q2, Q3, and Q4 into that order if Excel is displaying the quarters alphabetically or in another sequence.
- Check the chart after moving the item. Its legend should follow the updated PivotTable order. If the chart is filtered, clear or adjust the filter to confirm that the series you want to order are all visible.
If dragging does not work or items snap back, right-click an item label in the PivotTable and choose Sort > More Sort Options. Select manual sorting if that option is available. In the sort options, check whether automatic sorting each time the report is updated is enabled; an automatic sort can undo a custom sequence during a refresh.
Sort alphabetically or by a value
A custom sequence is not always necessary. If the legend should be alphabetical, right-click an item label in the PivotTable and choose Sort > Sort A to Z or Sort Z to A, as appropriate. The chart updates along with the table. For dates or numbers, Excel sorts the field according to its data type rather than treating every label as ordinary text.
You can also sort field items by a measure, such as total sales. Right-click a relevant row or column item, choose Sort, and use the value-based sort option available for the PivotTable. This can be helpful when the series should follow performance rather than alphabetic order. Be aware that sorting by a measure may produce a different order after filtering, changing the report’s values, or refreshing its source data.
Use alphabetical or value sorting when the order should be calculated from the data. Use manual ordering when the sequence carries meaning that Excel cannot infer—for example, stages such as Lead, Qualified, Proposal, and Won, or a fiscal period that does not begin in January.
Reorder separate value fields
If the legend contains multiple measures rather than category names, change the order of those measures. In the PivotTable Field List, look in the Values area for the measure names, such as Sum of Revenue and Sum of Units. Drag them into the preferred order. The chart’s series order should then follow that arrangement.
Some PivotTables display the special Values field among their row or column labels. In that layout, the displayed measure labels can also be rearranged in the PivotTable. The important distinction is between moving a measure and moving a category item: changing the sequence of Revenue and Units is not the same operation as changing the sequence of regions that appear within each measure.
If the chart has several fields in its Legend (Series) area, their field order affects how the series are grouped and nested. Rearranging those fields may change the chart’s structure, not just swap two labels. Before moving a whole field, check whether you intend to change the field hierarchy or only reorder its individual items.
Why you cannot usually drag the legend itself
With a standard chart, Excel provides a way to select the data series and move them up or down in the chart’s source-data settings. A PivotChart is different: its series are generated from PivotTable fields and items. As a result, the ordinary chart method of selecting a legend entry and moving it directly is not the right control for a PivotChart. The chart remains tied to its PivotTable structure.
Likewise, rearranging rows in the original source-data range is not a dependable way to set PivotChart legend order. A PivotTable aggregates and sorts its fields independently of the source rows. Change the field-item order or value-field order in the PivotTable instead. The source data still matters for the values and categories, but its physical row sequence is not a substitute for setting the PivotTable’s sort order.
If you specifically need to control series order using the ordinary chart’s Select Data controls, consider making a separate standard chart from a suitable summary range. That gives you more direct control over series order, but it will not behave exactly like a PivotChart when filtering and rearranging PivotTable fields.
Common problems and practical checks
- The chart order changes after refresh: Check the field’s sort settings. An automatic sort or a value-based sort can recalculate the sequence when the PivotTable updates. For a fixed custom sequence, use manual ordering and review the order after new data is added.
- The legend does not show every item: A PivotChart filter may be hiding some series. Use the field buttons on the chart, if shown, or the PivotTable’s filter controls to include the missing items before judging the full order.
- The wrong labels move: Verify which PivotTable field supplies the legend entries. A chart can use one field for its horizontal axis and another for its series. Reordering axis categories changes the order along the chart’s axis, not necessarily the legend.
- A category has no visible series: The PivotTable may be filtering it out, or there may be no matching data for the chart’s current filters. Check the PivotTable and its filters before trying to rearrange the legend.
- One chart changes when another is edited: Charts based on the same PivotTable reflect that table’s layout. If two reports need different ordering or field arrangements, consider whether they need separate PivotTables rather than assuming each chart has an independent series list.
Choose an order that makes the chart easier to read
The best order depends on what readers need to compare. Alphabetical order makes categories easy to find; chronological order helps readers follow change over time; and descending value order highlights the largest contributors. A purposeful business sequence is often clearer than alphabetical sorting when the categories represent steps, risk levels, or a planned workflow.
For example, a regional sales chart with West, East, Central, and South may be easier to scan alphabetically or ordered by sales, depending on the question the chart answers. A quarterly trend should normally run Q1 through Q4, even if another sort would place the labels differently. If the chart has many series, reducing the number of visible categories or splitting the comparison into separate charts may improve readability more than fine-tuning every legend position.
Remember that legend order and visual orientation are related but not identical. A bar chart can place categories in a different top-to-bottom direction depending on its axis settings, while the legend still follows the series order. If the legend looks right but the bars or categories appear in an unexpected direction, check the chart axis settings separately rather than repeatedly changing the PivotTable sort.
Does the process differ on Mac or Excel for the web?
The core principle is the same: change the PivotTable field or item order that generates the series. On Excel for Mac, select the PivotChart and use its PivotChart Analyze controls to display the field list when available; then adjust the connected PivotTable’s field layout or item order. Ribbon names and the placement of controls can differ slightly by Excel build, so look for the PivotChart Analyze tab and Field List command.
Excel for the web supports working with PivotTables and charts, but some PivotTable and chart controls may be more limited or arranged differently than in the Windows desktop app. If you cannot access the required manual-sort or field-list control in the browser, open the workbook in the desktop version of Excel to make the ordering change. In every version, changing the PivotTable is the reliable route for a PivotChart.
Frequently Asked Questions
Can I change the order of a PivotChart legend by dragging its labels?
Usually not. PivotChart legend entries are generated from PivotTable fields, so rearrange the corresponding field items or value fields in the PivotTable instead of dragging labels within the legend.
How do I put PivotChart legend entries in alphabetical order?
Right-click an item from the relevant field in the PivotTable and choose Sort > Sort A to Z. The PivotChart should update to match the PivotTable’s sorted items.
How do I make months appear in calendar order?
Use a date field that Excel recognizes as dates, or manually arrange the month items in the PivotTable. If month names are text, alphabetical sorting will put them in alphabetic—not calendar—order.
Why does my custom legend order disappear after I refresh?
The field may be set to sort automatically or by a changing value. Review its sort options and use manual ordering for a fixed sequence. After a refresh that adds new categories, check where Excel has placed the new items.
Can I reverse only the legend without changing the PivotTable?
A PivotChart generally takes its series sequence from the PivotTable, so changing that sequence also changes the table’s order. If independent legend ordering is essential, create a separate standard chart from a summary range and manage its series there.
Related
- Excel Data Validation Conditional Lists: Setup and Fixes
- Excel Data Validation Calendar Drop-Down: What Works
- Excel Data Validation: Change Cell Colors Automatically
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Room Chart in Google Sheets: Build One Step by StepYes. You can make a room chart in Google Sheets by arranging cells as rooms or seats, then…
- Excel Graph With Dates on the X-Axis: Setup and FixesTo make an Excel graph with dates on the x-axis, put real Excel dates in one column and…
- Excel Pivot Chart Type Changes With Slicer?No: in Excel for Microsoft 365, a slicer filters the data shown in a PivotChart, but it does…
- New Excel Charts for Dashboards: What to UseYes. Excel for Microsoft 365 includes several chart types that can make dashboards more informative, including waterfall, funnel,…
- Pie Chart in Excel: How to Create, Format, and Label ItTo create a pie chart in Excel for Microsoft 365 on Windows, select a column of category names…
- Steps Progress Chart in Excel: Build a Clear TrackerTo create a steps progress chart in Excel, list each step and its completion percentage, calculate the remaining…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.