Create a Clustered Column Chart by Year and Product ID in Excel
Question details
Create a chart that compares the Sum values for multiple product IDs by year.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user has Year, Product ID, and Sum fields and wants to compare products across years.
- Observed behavior
- The desired chart has years on the horizontal axis and side-by-side columns for product IDs, with column heights based on Sum.
Check that the source data has headers for Year, Product ID, and Sum, and that the Sum values are numeric. Use a clustered column chart for vertical bars; a clustered bar chart places the bars horizontally.
Create a PivotChart with Year and Product ID
Use a PivotChart to group and total source records by year and product automatically.
Select a cell in the source data, then choose Insert > PivotChart. Confirm the data range and choose where to place the chart.
In the PivotChart Fields pane, drag Year to Axis (Categories), Product ID to Legend (Series), and Sum to Values.
Open the menu for Sum in the Values area and select Value Field Settings. Choose Sum if Excel is counting the records instead of totaling them.
Select the chart and choose Chart Design > Change Chart Type > Column > Clustered Column. Use the chart title and legend controls to label it as needed.

Create a chart from a summary table
Use this method when the data is already summarized by year and product ID.
Compare yearly product totals in WPS Spreadsheets
Use a pivot table to organize totals by year and product, then create a clustered column chart in WPS Spreadsheets.
- 1. Open the data: Open your workbook in WPS Spreadsheets and select a cell in the table containing Year, Product ID, and Sum.
- 2. Create a pivot table: Choose Insert > PivotTable, confirm the source range, and choose where to place the pivot table.
- 3. Arrange the fields: In the pivot table field list, place Year in Rows, Product ID in Columns, and Sum in Values. Set the value calculation to Sum if needed.
- 4. Insert a clustered column chart: Select the pivot table's year labels, product headers, and values, excluding grand totals. Choose Insert > Chart > Column > Clustered Column.

Frequently Asked Questions
Why should I choose a column chart instead of a bar chart?
A clustered column chart displays vertical columns with years on the horizontal axis. A clustered bar chart displays horizontal bars instead.
What if Excel counts my values instead of adding them?
In the PivotChart Fields pane, open the Sum field's menu under Values, choose Value Field Settings, and select Sum. Check that the source values are numeric.
How do I put years on the horizontal axis?
For a PivotChart, drag Year to Axis (Categories) and Product ID to Legend (Series). For a regular chart, try Chart Design > Switch Row/Column.
What happens when a product has several records in the same year?
A PivotChart using Sum in the Values area adds those records together for that year and product ID.




