Notification

This article is about Looker Studio. For Looker documentation, visit https://cloud.google.com/looker/docs/intro.

Add comparison metrics and running totals

Compare row data to total and running values in your charts.

You can add metrics that compare each row of your data to the total value of a column. You can also apply running calculations to the data in your charts.

Add comparison metrics to a chart

  1. Edit your report.
  2. Select a chart.
  3. On the right, in the properties panel, select the SETUP tab.
  4. Choose a metric and click its edit pencil .
  5. Click the Comparison calculation menu and select the desired comparison. See below.
  6. To display the metric's native value, change the Comparison calculation selection to None.

The metric configuration options dialog, where you can edit the field name, change the aggregation and field type, and apply a comparison or running calculation.

Compare to total

You can compare each row of data to the overall total for that field:

  1. Percent of total shows the current row's value divided by the total for that field.
  2. Difference from total shows the total for that field minus the current row's value.
  3. Percent difference from total shows the total for that field minus the current row's value divided by the total for that field.

Example

The table below shows the results of applying different "compare to total" options to the Order Value field.This lets you evaluate each order's contribution to overall sales.

A table displays Item, Qty Sold, Order Value, and compare to total columns % Total, Difference, and % Difference.

Compare to max

You can compare each row of data to the maximum value for that field:

  1. Percent of max shows the current row's value divided by the maximum value for that field.
  2. Difference from max shows the current row's value minus the maximum value for that field.
  3. Percent difference from max shows the current row's value minus the maximum value for that field divided by the total for that field.

Example

The table below shows the results of applying different "compare to max" options to the Order Value field. This lets you see how each order compares to the maximum order.

A table chart displays columns for % of Max, Diff from Max, and % Diff from Max comparing pet food Item Order Values against the maximum Order Value.

Relative comparison

When your chart includes a comparison date range, you can apply the comparison function to either the base data or to the corresponding comparison date range.

For example, the time series charts below compare the current 28 days to the previous 28 days. The first two charts show the original data. The maximum value of Sessions for the current period was 1,947 on June 26. The maximum value of Sessions for the previous period was 1,571 on June 4.

Time series chart tooltip making two data comparisons: the first between June 26 and May 29, and the second between July 2 and June 4.

Original data.

The next chart applies the percent of max function, relative to base data. Every data point for the previous period is divided by the maximum value of the current period (1,947). For the data point on June 4, the percentage of max is 1571/1947 = 80.69%.

Time series chart tooltip with percent of max function applied relative to the base data displaying the percentage of max value for June 4.

Percent of max, relative to base data.

The final chart applies the percent of max function, relative to corresponding data. Every data point for the previous period is divided by the maximum value of the previous period (1,571). For the data point on June 4, the percentage of max is 1571/1571 = 100%.

Time series chart tooltip with percent of max function applied relative to corresponding data displaying the percentage of max value for June 4.

Percent of max, relative to corresponding data.

Apply running calculations

Running calculations compute summary results across a collection of values. Running calculations return a value for each row of input, expressing that row's relation to the collection as a whole.

The example below shows the application of 2 running calculations to the Analytics Users metric:

  1. Running sum
  2. Running delta

Example

A table chart displays the values Date, Source, Users, Running Sum of Users, and Running Delta of Users.

See a demonstration report here.

This allows you to see the cumulative number of users you have acquired up to a specific day, and how each day's numbers differ from each other.

Looker Studio supports the following running calculations:

  • Running sum
  • Running average
  • Running min
  • Running max
  • Running count
  • Running delta
  • Running percentage delta

To apply a running calculation

  1. Edit your report.
  2. Select a chart.
  3. On the right, in the properties panel, select the SETUP tab.
  4. Add a metric to chart, and then click its edit pencil .
  5. Click the Running calculation menu and select the desired function.
  6. To remove a running calculation, change the Running calculation option to None.
To display the original metric and the metric comparison or running calculation in the same chart, add a second instance of the original metric by dragging it from the Available Fields panel. (You can't add a duplicate field using the metric or dimension picker.)

Differences between running calculations and calculated fields

Calculated fields work on the data in your charts on a row-by-row basis. Running calculations work across rows, making it easy to show complex data relationships, without having to code custom SQL queries in your data set. Such queries would be difficult, if not impossible to replicate in a calculated field in your data source.

However unlike calculated fields, you can't edit the formulas of running calculations.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
5690153866576507045
true
Search Help Center
true
true
true
true
true
102097
false
false