← All posts
4 min read

How to Create Pivot Tables in Your Browser

Pivot tables reorganize your data by turning row values into columns, making it easy to see patterns across categories. They're one of Excel's most-used features, and you can create them in your browser without Excel.

What is a pivot table?

Suppose you have sales data with columns: product, region, and revenue. A pivot table can show products as rows, regions as columns, and the sum of revenue in each cell:

Before (flat):
product   | region | revenue
----------|--------|--------
Widget A  | East   | 1200
Widget A  | West   | 800
Widget B  | East   | 950
Widget B  | West   | 1100

After (pivoted):
product   | East  | West
----------|-------|------
Widget A  | 1200  | 800
Widget B  | 950   | 1100

How to create a pivot in ExploreMyData

  1. Open your file in ExploreMyData.
  2. Click the toolbar and select Pivot from the Aggregate group.
  3. Configure the pivot:
    • Value column: the column to aggregate (e.g., "revenue")
    • Pivot column: the column whose unique values become new columns (e.g., "region")
    • Aggregation function: COUNT, SUM, or AVG
  4. Click Apply. DuckDB's native PIVOT syntax handles the transformation.

Important details

  • SUM and AVG require numeric columns. If you try to SUM a text column, ExploreMyData will show an error explaining that the column must be numeric. Use COUNT for non-numeric pivot values.
  • All remaining columns become the row grouping. DuckDB's PIVOT automatically groups by all columns that aren't the value or pivot column. If you want to pivot on just one dimension, use Select Columns first to keep only the columns you need.
  • New columns are named after the pivot values. If the "region" column has values "East" and "West", the result will have columns named "East" and "West".

Under the hood

The generated SQL uses DuckDB's native PIVOT syntax:

PIVOT "sales" ON "region" USING SUM("revenue")

This is a single pipeline step. You can view the SQL by clicking "Show SQL" on the pipeline card, and delete it to revert.

Create a pivot table now →

Try it yourself

No sign-up, no upload, no tracking.

Open ExploreMyData