Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Forecasting with PivotTables and PivotCharts | Advanced Forecasting Dashboards & Decision-Making
Excel Forecasting & Scenario Analysis

Forecasting with PivotTables and PivotCharts

Swipe to show menu

Every analytical tool in this course — SUMIFS, OFFSET, structured references, scenario models — requires you to know in advance which dimensions you want to analyze. PivotTables remove that constraint. They let you slice, group, and summarize your data across any combination of dimensions interactively, without writing a single formula. For forecasting work, this means exploring patterns in your historical data freely before committing to forecast assumptions — and presenting multi-dimensional results to stakeholders without building a separate report for every combination they might ask for.

Why PivotTables Belong in a Forecasting Model

Most forecasting courses treat PivotTables as a reporting tool — something you use after the analysis is done to present results. In a well-designed forecasting model they serve three distinct roles throughout the process:

  • Exploration — before building any forecast, PivotTables let you quickly examine revenue patterns by any dimension: region, product, channel, segment, quarter. This exploration phase is where you discover which segments have consistent trends worth forecasting separately and which are too volatile for anything beyond a moving average;
  • Validation — after building SUMIFS-based forecast tables, PivotTables provide an independent cross-check. If your SUMIFS total for 2024 Software revenue matches the PivotTable total for the same slice, your formulas are correct. If they disagree, something is wrong;
  • Presentation — PivotCharts built on forecast data allow stakeholders to explore the forecast interactively rather than receiving a fixed view. A manager responsible for APAC can filter the PivotChart to their region without asking the analyst for a custom report.

Setting Up PivotTables on the Business_Data Table

Because your Business_Data is a properly named Excel Table, PivotTables built on it automatically include new rows when you refresh — no range updates ever needed.

Creating the base PivotTable:

  1. Click anywhere in Business_Data;
  2. Insert → PivotTable;
  3. Choose: New Worksheet
  4. In the PivotTable Fields pane, confirm the source is Business_Data;
  5. Name the new sheet: Pivot_Analysis.

The field list shows all 21 columns of your dataset plus any calculated columns you added (Month_Start, Period_Label, Rolling_12M, YTD_Flag). Every one of these is available as a row, column, filter, or value field.

Building the Core Analytical PivotTables

Build four PivotTables on the Pivot_Analysis sheet — each answering a specific analytical question that feeds into forecast assumption-setting.

PivotTable 1 — Revenue by Year and Month:

This is the time-series view that reveals seasonality patterns across all three years simultaneously.

Rows:     Month_Number (1–12)
Columns:  Year (2022, 2023, 2024)
Values:   Sum of Revenue

Add a calculated field for YoY growth:

PivotTable Analyze → Fields, Items & Sets → Calculated Field
Name: YoY_Growth
Formula: = Revenue / Revenue   (this is a placeholder — see note below)

⚠️ Note: PivotTable calculated fields cannot directly reference prior-period values, which makes true YoY growth formulas impossible inside the PivotTable itself. Instead, add YoY growth as a standard formula column in a table next to the PivotTable, referencing the PivotTable cells using GETPIVOTDATA.

Note
Note

PivotTable 2 — Revenue by Region and Product Category:

The cross-dimensional breakdown that reveals which region-category combinations are growing and which are declining.

Rows:     Region
Columns:  Product_Category
Values:   Sum of Revenue
Filter:   Year (use slicer — see below)

Add a second Values field — Sum of Profit — to show both revenue and profitability side by side. Change the layout to Tabular Form (PivotTable Design → Report Layout → Show in Tabular Form) for a cleaner, more readable structure.

PivotTable 3 — Monthly Revenue Trend with Rolling Context:

Combines the Month_Start grouping with rolling period flags to show both the full historical series and the most recent 12 months side by side.

Rows:     Month_Start (grouped by month)
Values:   Sum of Revenue
Filter:   Rolling_12M (filter to "In" to show only the last 12 months)

This PivotTable is the direct source for the PivotChart forecast visualization built later in this lesson.

PivotTable 4 — Segment Performance Matrix:

Shows revenue, profit, margin, and discount patterns across customer segments and sales channels simultaneously.

Rows:     Customer_Segment
Columns:  Sales_Channel
Values:   Sum of Revenue, Sum of Profit, Average of Discount_Percent

Add a calculated field for implied margin:

Name: Implied_Margin
Formula: = Profit / Revenue

This is one case where a PivotTable calculated field works well — both Profit and Revenue are in the same table and the ratio is calculated row by row within the PivotTable engine.

Using Slicers for Interactive Filtering

Slicers are visual filter buttons that control one or more PivotTables simultaneously. They are the key tool for making PivotTable-based reports interactive without requiring any formula work.

Adding slicers:

Click any PivotTable → PivotTable Analyze → Insert Slicer
Select: Year, Region, Product_Category, Sales_Channel, Customer_Segment
Click OK — five slicer panels appear

Connecting slicers to multiple PivotTables:

Right-click any slicer → Report Connections
Check all four PivotTables on the sheet
Click OK

Now clicking any button on any slicer filters all four PivotTables simultaneously. Selecting "2024" in the Year slicer and "Software" in the Product_Category slicer instantly shows 2024 Software performance across all four analytical views at once.

Formatting slicers for dashboard use:

Slicer tab → Slicer Styles → choose a style matching your color scheme
Columns: set to the number of items (e.g. 5 columns for a 5-region slicer)
Size: set consistent width and height across all slicers
Arrange: align using Page Layout → Align → Align Left / Distribute Vertically

Add a Timeline slicer for date-based filtering:

PivotTable Analyze → Insert Timeline → select Order_Date
This gives a visual date range selector — drag the handles to filter any date range

Using GETPIVOTDATA for Reliable References

When you reference a PivotTable cell in a formula by clicking on it, Excel writes a GETPIVOTDATA formula rather than a simple cell address. This is intentional and correct — a cell address reference breaks if the PivotTable layout changes, while GETPIVOTDATA always finds the right value by field name regardless of position.

Syntax:
=GETPIVOTDATA("Revenue", $A$3, "Year", 2024, "Region", "Europe")

Arguments:
"Revenue"  → the value field to retrieve
$A$3       → any cell inside the PivotTable (anchors the reference)
"Year", 2024 → filter: Year = 2024
"Region", "Europe" → filter: Region = Europe

Use GETPIVOTDATA to build the variance analysis table from Lesson 4.5 from PivotTable outputs rather than SUMIFS — for many users this is simpler to maintain because the PivotTable is the single calculation engine and the variance table just reads from it:

2024 Actual Revenue (Europe):
=GETPIVOTDATA("Revenue", Pivot_Analysis!$A$3, "Year", 2024, "Region", "Europe")

2023 Actual Revenue (Europe):
=GETPIVOTDATA("Revenue", Pivot_Analysis!$A$3, "Year", 2023, "Region", "Europe")

YoY Growth (Europe):
=(GETPIVOTDATA(...2024...) - GETPIVOTDATA(...2023...)) / GETPIVOTDATA(...2023...)

Building PivotCharts for Forecast Presentation

A PivotChart is a chart directly connected to a PivotTable — filtering the PivotTable automatically updates the chart. This makes PivotCharts the right tool for interactive stakeholder presentations where the audience may ask to see different slices of the forecast.

Building the primary forecast PivotChart:

Click PivotTable 3 (Monthly Revenue Trend)
Insert → PivotChart → Line Chart

The PivotChart shows a line for each Year (2022, 2023, 2024) across the 12 months, making the seasonal pattern immediately visible as three parallel lines. If the lines track closely together with consistent peaks and troughs, your seasonality indices from Lesson 4.1 are well-founded.

Adding forecast data to the PivotChart:

PivotCharts cannot directly show data from outside their source PivotTable. To add the 2025 forecast line:

  1. Right-click the PivotChart → Select Data;
  2. Click Add to add a new series;
  3. Series name: "2025 Forecast";
  4. Series values: Forecast_2025[Assumption_Forecast] (the 12 monthly values);
  5. Format as a dashed line in a distinct color — visually separates forecast from history.

This hybrid approach — PivotChart for historical lines, manually added series for forecast — gives you the interactivity of a PivotChart while including the forward-looking projection.

Field buttons on PivotCharts:

PivotCharts display field buttons (dropdowns) directly on the chart face — these let users filter the chart without going to the PivotTable. For presentation, hide them:

PivotChart Analyze → Field Buttons → Hide All

Restore them when you want to demonstrate interactivity to an audience.

Building a Forecast Exploration PivotChart Dashboard

Combine three PivotCharts and their associated slicers into a self-contained exploration view that any stakeholder can use without guidance:

  • Chart 1 — Revenue Trend by Dimension (Line):

    Source: PivotTable 1 with Month_Start in rows and selected dimension in columns. The dimension is controlled by a slicer — switching from Region to Product_Category to Customer_Segment changes the chart's breakdown without any formula work.

  • Chart 2 — Performance Heatmap (Heat Map via Conditional Formatting):

    Source: PivotTable 2 (Region × Product_Category matrix). Apply a color scale conditional formatting rule to the values — this turns the cross-dimensional PivotTable into a heat map showing which combinations are strongest and weakest.

  • Chart 3 — Segment Contribution (Stacked Bar):

    Source: PivotTable 4 (Segment × Channel). A stacked bar chart showing each segment's contribution to total revenue by channel — useful for understanding customer mix risk in the forecast.

Connect all three charts to the same Year, Region, and Product_Category slicers so clicking any filter updates all three views simultaneously.

Refreshing PivotTables When Data Changes

PivotTables do not update automatically when source data changes — they require a refresh. Set up automatic refresh so the forecast exploration view is always current:

Manual refresh:

Click any PivotTable → PivotTable Analyze → Refresh → Refresh All
Keyboard shortcut: Alt+F5 (refresh active PivotTable) or Ctrl+Alt+F5 (refresh all)

Automatic refresh on file open:

Right-click any PivotTable → PivotTable Options → Data tab
Check: "Refresh data when opening the file"

Apply this setting to all four PivotTables. Now every time a colleague opens the workbook after new data has been added to Business_Data, all PivotTables refresh automatically without any manual intervention.

Task 1: Build the Four Core PivotTables and Slicers

Goal: Create the analytical PivotTable foundation and connect it with interactive slicers.

  1. Insert a new sheet called Pivot_Analysis. Create all four PivotTables from this lesson, each with the field configuration specified above.
  2. For PivotTable 4, add the Implied_Margin calculated field and verify it produces sensible values — compare the top-line implied margin to your Gross_Margin named assumption as a sanity check.
  3. Add five slicers (Year, Region, Product_Category, Sales_Channel, Customer_Segment) and a Timeline slicer for Order_Date.
  4. Connect all slicers to all four PivotTables using Report Connections.
  5. Format all slicers consistently — matching column counts, sizes, and color scheme. Align them in a row above the PivotTables using the Align tools.
  6. Test the interactivity: select 2024 in the Year slicer, Europe in the Region slicer, and Software in the Product_Category slicer. Confirm all four PivotTables filter simultaneously and the results are consistent with your SUMIFS formulas from earlier sections.

Task 2: Build the PivotCharts and Forecast Exploration Dashboard

Goal: Create the three PivotCharts, add the 2025 forecast series, and assemble a self-contained interactive exploration view.

  1. Build the primary forecast PivotChart from PivotTable 3. Add the 2025 Assumption_Forecast as a manually added dashed series. Confirm the three historical year lines show a consistent seasonal pattern.
  2. Apply color scale conditional formatting to PivotTable 2 to create the performance heat map. Verify the colors make intuitive sense — your highest-revenue combinations should be green.
  3. Build the stacked bar PivotChart from PivotTable 4 showing segment contribution by channel.
  4. Set all four PivotTables to refresh automatically on file open.
  5. Create a new sheet called Forecast_Explorer. Copy all three PivotCharts and all six slicers onto this sheet. Arrange them in the two-by-two chart layout with slicers running across the top.
  6. Test the complete exploration view: use the slicers to answer three specific business questions — which region showed the strongest 2024 revenue growth, which product category has the highest implied margin, and which customer segment generates the most revenue through the Online channel. Record the answers in comment cells next to the relevant chart.
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 4

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 5. Chapter 4
some-alt