luvv to helpDiscover the Best Free Online Tools
Topic 6 of 8

Pivot Tables For Marketing Data

Learn Pivot Tables For Marketing Data for free with explanations, exercises, and a quick test (for Marketing Analyst).

Published: December 22, 2025 | Updated: December 22, 2025

Who this is for

  • Marketing Analysts who need to quickly summarize campaign, channel, and region performance.
  • Marketers who want a reliable way to answer ad hoc questions without writing SQL.
  • Beginners who know spreadsheets but want to analyze large tables efficiently.

Prerequisites

  • Comfort with spreadsheets (Excel or Google Sheets): entering formulas, sorting, basic filters.
  • Familiarity with marketing metrics: impressions, clicks, CTR, conversions, CPA, revenue, ROAS.
  • Clean tabular data with headers and consistent data types (dates as dates, numbers as numbers).

Learning path

  1. Understand what pivot tables do and when to use them.
  2. Build core pivots: summarize by channel, campaign, and month.
  3. Add calculations: conversion rate, CPA, ROAS.
  4. Filter and segment with slicers, value filters, and report filters.
  5. Format, refresh, and troubleshoot.

Why this matters

Real tasks a Marketing Analyst handles regularly:

  • Weekly channel performance: Spend, Conversions, ROAS by Channel and Week.
  • Campaign ranking: Top campaigns by Revenue and CPA.
  • Cohorts: New customers by signup month and their 60-day revenue.
  • Region analysis: Product revenue by Region with quick filters for dates.

Pivot tables make these tasks fast, repeatable, and resilient to data changes.

Concept explained simply

A pivot table condenses a long list of rows into a compact summary. You choose what becomes rows (dimensions like Channel or Campaign), what becomes columns (like Month), and what to calculate (values like Sum of Spend, Sum of Conversions).

Mental model

Imagine pouring your raw table into a 4-slot sorter:

  • Rows: how you want to group down the page (e.g., Channel).
  • Columns: how you want to group across (e.g., Month).
  • Values: what to compute (Sum of Spend, Count of Orders, Average of CPA).
  • Filters: what to include or exclude (Date ranges, Regions, Status).

Change any slot, and the summary reshapes instantly without changing the original data.

Data hygiene that saves you time

  • Single header row, no merged cells.
  • Each column has one data type (dates as dates, numbers as numbers).
  • No totals inside the source range; pivot tables generate totals.
  • Use a named range or table for the source so the pivot grows with new rows.
Troubleshooting quick wins
  • If grouping by Month fails, the Date column is not a true date. Reformat or use a date parsing function.
  • If sums look wrong, check text numbers; convert with value functions.
  • If new data is ignored, refresh the pivot and confirm the source range.

Worked examples

1) Channel performance by month with CPA and ROAS

  1. Insert pivot table from your campaign log.
  2. Rows: Channel. Columns: Month (group your Date field by Month).
  3. Values: Sum of Spend, Sum of Conversions, Sum of Revenue.
  4. Add a calculated field (or helper columns in the source):
    • CPA = Spend / Conversions (handle divide-by-zero).
    • ROAS = Revenue / Spend (handle divide-by-zero).
  5. Format CPA as currency and ROAS as number with 2 decimals.
What to look for
  • Channels with high ROAS and acceptable CPA.
  • Months where performance changes sharply.

2) Campaign leaderboard (Top N by Revenue)

  1. Rows: Campaign. Values: Sum of Revenue, Sum of Spend.
  2. Apply Value Filters on Revenue: Top 10 (or Top 5).
  3. Sort by Revenue descending.
  4. Add calculated field: ROAS = Revenue / Spend.
What to look for
  • Campaigns with strong revenue but weak ROAS (may be overspending).
  • Outliers with zero spend and non-zero revenue (check attribution).

3) Cohort view (Signup Month x Revenue 60 days)

  1. Add a column in source data: SignupMonth = first day of month of SignupDate.
  2. Add a column: Revenue_60d = revenue accumulated within 60 days of signup.
  3. Rows: SignupMonth. Columns: none (or Marketing Channel if helpful).
  4. Values: Sum of Revenue_60d, Count of Customers.
  5. Add calculated field: AvgRevPerCustomer = Sum(Revenue_60d) / Count(Customers).
What to look for
  • Cohorts with rising average revenue (better quality acquisition).
  • Cohorts that need CRM nurturing.

4) Regional mix with slicers

  1. Rows: Region. Columns: Channel.
  2. Values: Sum of Revenue, Sum of Conversions.
  3. Insert slicers for Date and Product Category (if available) to segment quickly.
What to look for
  • Regions where a specific channel overperforms.
  • Segments where conversions are high but revenue is low (AOV issue).

Exercises

These match the exercises below. You can paste the sample CSV into a sheet and build the pivot.

Sample data (copy into a sheet)
Date,Channel,Campaign,Spend,Impressions,Clicks,Conversions,Revenue,Region
2025-01-03,Search,Brand_US,1200,80000,4000,160,6400,North
2025-01-10,Social,Promo_Winter,800,120000,3000,60,2400,North
2025-01-15,Email,Jan_Newsletter,0,50000,2500,75,3000,North
2025-02-02,Search,NonBrand_US,1500,90000,3600,72,3600,West
2025-02-05,Social,Promo_Winter,900,130000,3200,64,2560,West
2025-02-12,Affiliate,Partner_A,400,20000,800,32,1280,West
2025-02-20,Email,Feb_Sale,0,60000,3600,108,4320,West
2025-01-22,Affiliate,Partner_A,300,15000,600,24,960,North

Exercise 1 (mirrors the detailed exercise below)

  1. Build a pivot with Rows: Channel; Columns: Month; Values: Sum of Spend, Sum of Conversions, Sum of Revenue.
  2. Add CPA = Spend / Conversions and ROAS = Revenue / Spend.
  3. Check that Email has zero spend and conversions > 0; handle divide-by-zero cleanly.

Self-check checklist

  • Date grouped into Jan and Feb correctly.
  • Sums match the source totals.
  • CPA and ROAS are correctly calculated and formatted.
  • Zero-spend rows do not show errors.

Common mistakes and how to self-check

  • Mistake: Date won’t group by Month. Fix: Convert to true dates; remove text formatting.
  • Mistake: Totals are off. Fix: Ensure no duplicate header rows; verify data range includes all rows.
  • Mistake: Division errors for CPA/ROAS. Fix: Wrap calculations with IFERROR or test for zero.
  • Mistake: Comparing averages to sums. Fix: Align numerator and denominator (e.g., overall CTR = Sum(Clicks)/Sum(Impressions), not Average of CTR).
  • Mistake: Stale data after updates. Fix: Refresh the pivot and confirm the source range or named table.
Quick audit steps
  • Grand totals equal the sum of the source columns.
  • Spot-check one campaign row against the raw data.
  • Filters on the pivot match the intended date and region window.

Practical projects

  • Weekly Marketing Dashboard: One pivot per channel with slicers for week and region.
  • Campaign QA Tool: Pivot of Campaign x Metric with conditional formatting to flag CPA above target.
  • Attribution Snapshot: Pivot by First-Touch Channel and Conversion Type with ROAS.

Quick Test

Take the quick test below to validate your understanding. The test is available to everyone; only logged-in users get saved progress.

Next steps

  • Automate refresh: keep your source as a named table so pivots update with new rows.
  • Practice value filters (Top N) and slicers for rapid exploration.
  • Combine pivots with charts for stakeholder-ready visuals.

Mini challenge

Using the sample data, answer in under 3 minutes:

  • Which channel had the best ROAS in February?
  • Which campaign would you cut first if the target CPA is 13?
  • What is total conversions by Region in January?
Tips
  • Use Value Filters to rank.
  • Add Region to Rows under Channel to break out regional totals.
  • Group Date by Month to isolate January and February.

Practice Exercises

1 exercises to complete

Instructions

Build a pivot table from the sample dataset below.

  1. Insert a pivot from the range that includes headers.
  2. Rows: Channel.
  3. Columns: Month (group the Date field by Month).
  4. Values: Sum of Spend, Sum of Conversions, Sum of Revenue.
  5. Add calculated fields or helper columns: CPA = Spend / Conversions, ROAS = Revenue / Spend. Use IFERROR or zero checks to avoid divide-by-zero.
  6. Format CPA as currency; ROAS with 2 decimals.
Sample CSV
Date,Channel,Campaign,Spend,Impressions,Clicks,Conversions,Revenue,Region
2025-01-03,Search,Brand_US,1200,80000,4000,160,6400,North
2025-01-10,Social,Promo_Winter,800,120000,3000,60,2400,North
2025-01-15,Email,Jan_Newsletter,0,50000,2500,75,3000,North
2025-02-02,Search,NonBrand_US,1500,90000,3600,72,3600,West
2025-02-05,Social,Promo_Winter,900,130000,3200,64,2560,West
2025-02-12,Affiliate,Partner_A,400,20000,800,32,1280,West
2025-02-20,Email,Feb_Sale,0,60000,3600,108,4320,West
2025-01-22,Affiliate,Partner_A,300,15000,600,24,960,North
Expected Output
A pivot summarized by Channel (rows) and Month (columns) showing Spend, Conversions, Revenue, plus CPA and ROAS. Totals by channel: Search Spend 2700, Conversions 232, Revenue 10000; Social Spend 1700, Conversions 124, Revenue 4960; Email Spend 0, Conversions 183, Revenue 7320; Affiliate Spend 700, Conversions 56, Revenue 2240. CPA: Search ≈ 11.64; Social ≈ 13.71; Email = 0; Affiliate = 12.50. ROAS: Search ≈ 3.70; Social ≈ 2.92; Email = n/a (or blank); Affiliate ≈ 3.20.

Pivot Tables For Marketing Data — Quick Test

Test your knowledge with 10 questions. Pass with 70% or higher.

10 questions70% to pass

Have questions about Pivot Tables For Marketing Data?

AI Assistant

Ask questions about this tool