Skip to main content

Comparative calculations

Comparative calculations put a metric in context, either against a total (its share of the whole) or against a past period (how it changed).

Percent of total

Calculates the percentage of a metric relative to the original value of that metric.

percent of total calculation

Inputs

InputRequired?Description
ValueYesThe metric to turn into a share.
Total ValueYesWhich total to divide by:
  • Grand total: share of the overall total.
  • Row total / Column total: share within that row or column (most useful in a pivot).
  • Custom: calculate the total across the dimensions you select (for example, across Category → % within each Country).

Use cases

  • Revenue share by product category
  • Gender mix within each signup year
  • Region's share of orders within a channel
  • Product share of revenue within each country

Period over period

Calculates the change of a metric between two periods.

period over period valueperiod over period percent change

Inputs

InputRequired?Description
MetricYesThe metric to compare across periods.
Time dimensionYesThe date/time field to shift along.
On the viz where this period over period metric is used, include this time dimension with at least hour granularity.
Comparison periodYesHow far to compare:
  • Previous / Next: a relative shift (offset + unit, such as 1 month or 1 year).
  • Custom: a fixed date range to compare against.
DisplayYesWhat to show for each row:
  • Period value: the metric in the comparison period.
  • Change (Δ): absolute difference (current − comparison).
  • % change (%Δ): relative difference vs the comparison period.

Use cases

  • This month's orders vs same month last year
  • Weekly revenue vs the prior week
  • Today's signups vs same weekday last week
  • Campaign week GMV vs a fixed baseline week

Open Markdown
Let us know what you think about this document :)