Create a Clustered Column Chart by Year from Excel PivotTable Data
Question details
Create a clustered column chart that compares monthly values across years using PivotTable data.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants to prepare monthly and yearly data so that each month has separate bars for years such as 2017 and 2018.
- Observed behavior
- The desired chart displays months on the horizontal axis, years as separate series, and the aggregated measure as column heights.
Check whether your source data has a date and value on each row or whether dates are spread across column headers. Confirm that dates can be recognized as dates and identify the numeric field you want to chart.
Reshape the data in Power Query and create a PivotChart
Use this method when monthly dates or values are spread across columns and need to be converted into a PivotTable-friendly layout.
The target layout has one row per observation, with date, year, month, and numeric value fields. If the data is already in this layout, you can skip the unpivoting step.
Select a cell in the source range and choose Data > From Table/Range. Confirm the table range and headers, then open the Power Query Editor.
If dates are column headers, select the columns that identify each record, such as a product name, and choose Transform > Unpivot Columns > Unpivot Other Columns. Rename the resulting Attribute and Value columns to Date and Value.
Set the Date column's data type to Date. Select it and use Add Column > Date > Year > Year, then select Date again and use Add Column > Date > Month > Month. The year can also be extracted in a custom column with Date.Year([Date]).
Choose Home > Close & Load to load the query into Excel. Alternatively, use Close & Load To to choose another available destination.
Select the loaded table and choose Insert > PivotTable. In PivotTable Fields, drag Month to Rows, Year to Columns, and Value to Values. Check Value Field Settings if you need a calculation other than Sum.
Select the PivotTable and choose Insert > PivotChart > Column > Clustered Column. Check that months appear on the horizontal axis and each year appears as a separate legend series.

Create the chart from an existing PivotTable
Use this shorter method if your PivotTable already contains month, year, and value fields.
Compare Monthly Values by Year in WPS Spreadsheet
Use WPS Spreadsheet to summarize date-based data in a PivotTable and create a clustered column chart with separate series for each year.
- 1. Open and prepare the data: Open the workbook in WPS Spreadsheet. Arrange the source with one row per observation and columns for Date and Value; add Year and Month columns using formulas such as =YEAR(A2) and =MONTH(A2) when the date is in A2.
- 2. Insert a PivotTable: Select the prepared data range and choose Insert > PivotTable. Place Month in the row area, Year in the column area, and Value in the values area.
- 3. Select the summary: Select the PivotTable's month labels, year headings, and summarized values. Exclude grand totals if you do not want them plotted.
- 4. Create the chart: Choose Insert > Chart and select a clustered column chart. Check that months are on the horizontal axis and years are shown as separate series; switch rows and columns in the chart settings if necessary.

Frequently Asked Questions
Why are the years showing on the axis instead of as separate bars?
In the PivotTable Fields pane, move Year to Columns and Month to Rows. Then check that the PivotChart uses Clustered Column rather than a stacked chart type.
How do I keep months in chronological order?
Use a numeric month field from 1 to 12 and sort it from smallest to largest in the PivotTable. In Power Query, create it by selecting the date column and choosing Add Column > Date > Month > Month.
Do I need Power Pivot to create this chart?
No. You can load the prepared data into an Excel worksheet and create a regular PivotTable and PivotChart. The Data Model and Power Pivot are optional for this basic comparison.
Where can I find Power Query in Excel?
Look on the Data tab for Get & Transform Data or From Table/Range. Availability and menu names vary by Excel version and platform.
What if my source already has one date and value per row?
You do not need to unpivot it. Add year and month fields in Power Query or with worksheet formulas, then insert a PivotTable with Month in Rows, Year in Columns, and Value in Values.




