Pivot Tables

Last updated: September 28, 2026

Pivot tables in Polar allow:

  • Controlling which axis of a table contains metrics, breakdowns and comparisons

  • Controlling whether totals are shown or not, and in which position

  • Collapsing rows to expandable drill-downs

How to think about Pivots

A table always has two axes. Usually metrics become columns and breakdowns (including dates) become rows, but this is flexible.

If you have more than one breakdown (for example Weeks and Cities) it can be useful to move the Weeks breakdown to columns instead. This way you have better visibility of trends:

  • Rows tell you how the City varied by Week

  • Columns tell you how the Week varied by City

Cities as rows and weeks as columns

Even with a single breakdown, it can help to swap the metrics to rows when you have a lot of them.

Metrics as rows and weeks as columns

Building a basic pivot table

  1. Add at least one metric to your block (e.g. Gross Sales), and put it in Table mode

  2. Click the Pivot Layout button

  1. You will see the sidebar.

    1. The Rows section shows you what will become a row in your report. Date is here since Granularity produces rows for days, weeks months etc by default.

    2. The Columns section shows you what will become a column in your report. Metrics is here since they're oriented as columns with headers at the top by default.

    3. The Metrics section shows you all your metrics and lets you control their behaviour in the layout.

  1. Now you can drag the Metrics or Dates chips between the Rows and Columns spaces to reorientate their axes.

  2. Or you can click '+ add breakdown' in one of the sections to add a new breakdown in that axis.

Here's an example with Date By Week as rows and a Customer Type dimension as columns, along with Metrics headers as columns, which causes the metric name to go to the top.

Totals

Total lets you show or hide totals, and decide whether you want them on the left or right (total columns) or above/below (total rows).

Total Row set to 'After' and Total Column set to 'Before'

Drilldowns

If you have more than one breakdown in Rows, you can enable Drilldowns, which will collapse the breakdowns into an expandable tree, with subtotals at each level.

Drilldowns enabled, causing the two row breakdowns to be nested

Show in Total / Pivot

If you have both Totals and Pivots active, you can control which metrics show in the pivot area and the total area. This is useful for managing the number of columns in your report to keep things readable.

Click the three dots next to a metric and choose "Show in Pivot" or "Show in total" to toggle visibility.

In this example:

  • Gross Sales appears in both

  • Total Orders only appears in totals (you don't see it per-month)

  • Returns only appears in pivot (you don't see the total)

Metrics shown and hidden from the total and pivot areas

If you choose to only show in Total but the report has Totals disabled, the metric will become disabled since it has no place to show up.

Comparisons

When comparisons are active, you have control over two extra things:

  • Whether the previous value shows in its own row/column or not

  • Which axis to show the comparisons in (rows or columns)

  1. Start by enabling comparisons, choosing 'all metrics' and locking to a period.

  1. A Comparisons block will appear at the end of the sidebar, and you'll see comparisons inline in cells by default.

  2. Click 'own column' to make the previous values appear as a separate column.

You'll also see a Comparison chip appear in columns. Move it above metrics if you want to group metrics under the comparison periods instead of periods below metrics.

You can even drag the comparison chip to the Rows section to have the previous values in rows instead of columns:

Sorting

Sorting a pivot table is a bit different from sorting a regular table.

You can also add secondary sorts in either axis if you have more than one breakdown.