Chart & Visualization Issues

Create a Clustered Column Chart by Year and Product ID in Excel

Khadija KhanKhadija Khan Nov 18, 2026 871 views

Question details

Create a chart that compares the Sum values for multiple product IDs by year.

Create a Clustered Column Chart by Year and Product ID in Excel
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.
Before you start

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.

Solution 1Recommended

Create a PivotChart with Year and Product ID

Use a PivotChart to group and total source records by year and product automatically.

1
Insert a PivotChart

Select a cell in the source data, then choose Insert > PivotChart. Confirm the data range and choose where to place the chart.

2
Assign the fields

In the PivotChart Fields pane, drag Year to Axis (Categories), Product ID to Legend (Series), and Sum to Values.

3
Check the calculation

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.

4
Choose the chart type

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 PivotChart with Year and Product ID
Repeated records: When multiple records have the same year and product ID, the PivotChart adds their Sum values together.
Create charts in WPS Spreadsheets

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. 1. Open the data: Open your workbook in WPS Spreadsheets and select a cell in the table containing Year, Product ID, and Sum.
  2. 2. Create a pivot table: Choose Insert > PivotTable, confirm the source range, and choose where to place the pivot table.
  3. 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. 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.
Compare product totals side by side for each yearSummarize repeated records with a pivot tableOpen and edit Microsoft Excel XLSX filesCreate and format charts in a familiar spreadsheet interface
microsoft office alternative - wps office

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.