To change what appears on an Excel PivotChart’s X and Y axes, select the chart, open its PivotChart Fields pane, and move fields between Axis (Categories), Legend (Series), and Values. For a column chart, categories usually appear on the horizontal X axis and values on the vertical Y axis; a bar chart displays those directions the other way around. The steps below use Excel for Microsoft 365 on Windows.
What You’ll Need
- An Excel workbook with a PivotTable and its associated PivotChart. If you have only a regular chart, the field-pane instructions below do not apply; create a PivotTable and PivotChart from the source data first.
- Access to the workbook in the Excel desktop app. Excel for the web can handle some PivotChart edits, but available controls can differ. If you cannot find a field or chart-layout control online, open the workbook in desktop Excel.
- A clear idea of which field should define the categories, which field should divide the chart into series, and which numeric field should be measured. For example, you might want months as categories, product lines as series, and revenue as values.
Step-by-Step
- Select the PivotChart. Click the chart once so Excel displays the chart-specific ribbon tabs. Confirm that it is a PivotChart: selecting it should reveal a PivotChart Analyze tab, and the chart will be connected to PivotTable fields. If you select a standard chart instead, you will see different controls and will need to edit its source data or use its Select Data controls.
- Open the field list. In Windows Excel, choose PivotChart Analyze > Field List. The PivotChart Fields pane should appear, usually on the right. If the pane is already open, keep it visible while you work. If you cannot see the PivotChart Analyze tab, click the chart’s outer border rather than a label, data point, or an empty worksheet cell.
- Identify the four field areas. The pane lists available fields and has drop zones named Filters, Legend (Series), Axis (Categories), and Values. The field in Axis (Categories) supplies the category labels. Legend (Series) splits the data into separate plotted series, often shown as different colors. Values contains the numbers being summarized. Filters limits the data shown without defining either chart axis.
- Put the category field on the axis you want. Drag the field that should label the categories into Axis (Categories). For instance, drag Month there to show one category for each month. If the wrong field is already in that area, drag it out or use its drop-down menu to remove it, then add the correct field. You can also select or clear fields in the list, but dragging gives you direct control over the placement.
- Choose how to split the data into series. Drag a second descriptive field, such as Region or Product, into Legend (Series) if you want separate colored series for each item. If you want those items listed one after another as categories instead, move that field to Axis (Categories). Moving a field between these two areas changes how the chart groups the data; it does not change the underlying source records. Watch the chart update as you move the field.
- Keep the numeric measure in Values. Make sure the field you want to measure, such as Sales, Count of Orders, or Units, is in Values. In a column chart, this field is plotted vertically on the Y axis; in a horizontal bar chart, it is plotted horizontally on the X axis. To change the calculation, open the field’s menu in Values, choose Value Field Settings, and select the appropriate summary such as Sum or Count. The option you choose depends on what the numbers represent.
- Use Switch Row/Column if you want to exchange the groupings. With the chart selected, try Chart Design > Switch Row/Column. This can exchange which PivotTable grouping is used for categories and series. Check the result: the field list is the more precise way to choose exactly which field belongs in each area, and Switch Row/Column may not be available for every chart setup. If the button is unavailable or produces an unsuitable arrangement, return to the field pane and move the fields yourself.
- Check the chart type before judging the axis direction. Choose Chart Design > Change Chart Type if you need to switch between a column and a bar chart, for example. In a column chart, the category axis runs left to right and the value axis runs bottom to top. In a bar chart, categories run vertically and values run left to right. Choosing a different chart type changes the visual orientation; it does not necessarily exchange the category and measure fields.
- Refresh and check the result. If the source data has changed, select the PivotTable and choose PivotTable Analyze > Refresh, or right-click the PivotTable and choose Refresh. Then check that the expected categories, series, and values appear. If labels are crowded, widen the chart or reduce the number of categories before changing the axis fields again.
- Optional: add or rename axis titles. To explain the axes, select the chart and choose Chart Design > Add Chart Element > Axis Titles, then select Primary Horizontal or Primary Vertical as appropriate. Click the title displayed on the chart and type a clear label, such as Month or Revenue. In a bar chart, remember that the horizontal axis is normally the value axis, so name it accordingly.
On Mac, select the PivotChart and use the PivotChart Analyze and Chart Design tabs if they are shown; the Field List command and field areas work on the same principle, though ribbon labels or placement can vary by Excel build. On Excel for the web, select the chart and look for its field or PivotChart controls. If those controls are missing, use Open in Desktop App rather than trying to edit the PivotChart as if it were a regular chart.
Common Mistakes
- Expecting the X axis to always be horizontal. X and Y describe positions in a coordinate system, but chart types display them differently. A bar chart puts category labels vertically and numeric values horizontally. Check which axis is the category axis and which is the value axis before moving fields.
- Moving the measure into Axis (Categories). A numeric field intended to be added or averaged generally belongs in Values. Putting a field in the wrong area can produce a chart that counts records, shows unexpected labels, or loses the comparison you intended.
- Confusing series with categories. A field in Legend (Series) creates separate data series; it is not another value measure. If you want each region to appear along the category axis, move Region to Axis (Categories), not Legend (Series).
- Trying to change a PivotChart through Select Data. PivotCharts are controlled by their PivotTable fields, so their series and categories are not managed in the same way as a regular chart. Use the PivotChart Fields pane instead of relying on Chart Design > Select Data.
- Editing the chart but not refreshing its source. If recently added records do not appear, refreshing the PivotTable may be needed. Also verify that the source range includes the new records; refresh cannot include data that is outside the PivotTable’s source.
Tips
- Decide on the story first: categories answer what items are being compared, series answer how those items are split, and Values answer what is measured. This makes it easier to place fields correctly without repeatedly rearranging the chart.
- Use a small number of series when possible. If you place a field with dozens of distinct items in Legend (Series), the chart may become crowded and its legend hard to read. Put that field on the category axis or filter the PivotChart to a smaller selection.
- Give the value field a meaningful summary. Sales totals often use Sum, while a field containing one record per order may need Count. Open Value Field Settings to confirm the calculation rather than assuming Excel is using the one you expect.
- Keep the PivotTable and PivotChart together while arranging fields. A change to a PivotChart’s fields also affects its connected PivotTable layout, so check the table if other people rely on it for a separate view.
- Save a copy before making major layout changes to a shared report. You can usually undo field moves, but a saved version makes it easier to restore a useful chart configuration or compare alternative layouts.
Troubleshooting
The Field List command is missing. Click the chart itself, then check PivotChart Analyze > Field List. If Excel shows only Chart Design and Format tabs, you may have selected a regular chart. Click a cell in the associated PivotTable and use PivotTable Analyze > Field List to confirm the table fields. A regular chart cannot be rearranged through PivotChart field areas.
The chart does not change when you move a field. Confirm that the field actually moved to a different area and that Values still contains a measure. Check whether a filter is excluding the items you expect. If source data was edited, refresh the PivotTable. If the chart remains unchanged, select the related PivotTable and verify that the chart is connected to that table rather than another PivotTable in the workbook.
The values are on the wrong-looking axis. Check the chart type first. A column chart places values vertically, while a bar chart places them horizontally. If the measure itself is wrong, inspect the Values area and Value Field Settings. If only the category order is wrong, use the field’s sort controls or sort the PivotTable; do not move the measure field just to reverse the order.
Switch Row/Column is grayed out. That control is not the only way to rearrange a PivotChart. Open PivotChart Analyze > Field List and move the relevant fields between Axis (Categories) and Legend (Series). If a field cannot be moved as expected, check that the chart is selected and that the field is available in the list.
New categories are missing after refresh. Check the PivotTable’s source data range. If new rows were added below a fixed range, the source may not include them. Update the source through PivotTable Analyze > Change Data Source, or use an Excel table as the PivotTable source so added rows are easier to include. Refresh again after correcting the source.
The labels are too crowded or difficult to read. Reduce the number of categories using a filter, widen the chart, or choose a layout better suited to long labels. Rotating or formatting labels may help, but changing which field goes on the axis is usually the better fix if the chart is overloaded with detail.
Frequently Asked Questions
How do I swap the X and Y axes in a PivotChart?
Move the category field and series field between Axis (Categories) and Legend (Series) in the PivotChart Fields pane. If you mean changing which direction the values run, try a different chart type, such as changing a column chart to a bar chart. A PivotChart does not always behave like an ordinary XY scatter chart with two numeric axes.
Why can’t I use Select Data to edit my PivotChart?
A PivotChart gets its categories and series from its associated PivotTable. Excel therefore expects you to change the PivotTable field layout rather than manually edit the chart’s data series. Use PivotChart Analyze > Field List to rearrange fields.
Can I put two fields on the category axis?
Yes. Place more than one field in Axis (Categories) to create nested category labels, such as Year followed by Month. The exact display depends on the chart layout and the field order. If the labels become too dense, remove a level or filter the chart.
How do I change the order of categories?
Sort the field in the connected PivotTable or use the field’s sort options. The chart follows the PivotTable’s category order. For dates, check that Excel recognizes the source values as dates and that the field is grouped as intended.
Will changing the PivotChart fields also change my PivotTable?
Usually, yes: a PivotChart is linked to a PivotTable, and rearranging its fields changes the connected PivotTable layout as well. If you need two different layouts, create a separate PivotTable and PivotChart for the second view, or make a copy of the report before changing it.
Related
- Excel Split Cell Color in Half: What Works
- Excel Split Cell in Half Horizontally: Real Options
- Excel Split Cell Shortcut: The Fastest Ways to Separate Data
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Remove a Section Break in Word Without Wrecking LayoutTo remove a section break in Microsoft Word for Microsoft 365 on Windows, choose Home > ¶ to…
- Import Emails From Outlook: PST and Account OptionsTo import emails into Outlook, use Outlook classic for Windows to import a Personal Folders file (.pst): choose…
- SUMIF Negative Values in Google Sheets: Formula HelpTo total negative numbers in Google Sheets, use SUMIF with the criterion "<0". If the values are in…
- Check Duplicates in Google Sheets: Methods That WorkTo check duplicates in Google Sheets, select the cells and choose Format > Conditional formatting, then use a…
- How to Add Rules to a Shared Mailbox in OutlookTo add rules to a shared mailbox in Outlook, open the shared mailbox itself, create a rule in…
- How to Add Consecutive Page Numbers in Microsoft WordTo add consecutive page numbers in Word, choose Insert > Page Number, select where the numbers should appear,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.