Notification

This Help Center is moving to Cloud. Learn more about the migration.

Tutorial: Create a ratio field based on filtered metrics

Use data blending to calculate and compare values for fields that meet certain conditions.

A common use case in reporting and data visualization is to display key performance indicators (KPI) as ratios of one indicator as compared to another. For example, suppose you are measuring the completion rate of an online coding academy. A KPI for the course is completion rate, which we'll define here as:

Course completions / Course registrations

If your data set already contains this data then you can simply display the result in Looker Studio. But what if you need to calculate it in your report, or need to display completion rates based on filtered data? The solution is to use data blending.

Say your data looks like this:

Event Category Event Action Course Number Unique Events
Course Certificate Download 9 299
Course Complete Fail 8 21
Course Complete Fail 9 86
Course Complete Pass 9 337
Course Complete Fail 6 34
Course Complete Pass 7 363
Course Complete Fail 7 17
Registration Register 8 814
Registration Register 7 475
Registration Register 5 574
Registration Register 9 1078
Registration Unregister 6 22

Instructions

1Calculate the course completions

  1. Add a scorecard to your report. Call it Course Completions.
  2. Set the metric to Unique Events.
  3. Add a filter to the scorecard to ignore non-completion events:
    1. Include Event Category = "Course Complete"
    2. AND
    3. Include Event Action = "Pass"

Based on the sample data, the scorecard would look like this:

Course Completions

700

2Calculate the course registrations

  1. Add a scorecard to your report. Call it Course Registrations.
  2. Set the metric to Unique Events.
  3. Add a filter to the scorecard to ignore non-registration events:
    1. Include Event Category = "Registration"
    2. AND
    3. Include Event Action = "Register"

Based on the sample data, the scorecard would look like this:

Course Registrations

2,941

3Blend the data from the scorecards

  1. Select the Course Registrations scorecard, then select the Course Completions scorecard.
  2. Right-click, then select Blend data.

This creates a new scorecard that automatically calculates the ratio between those metrics:

Course Completion Rate

23.80%

 

To create more complex calculated fields or change the number display:
  1. Select the blended scorecard.
  2. Edit the metric.
  3. Enter a new formula and/or change the field Type to match the data.

A user selects a scorecard chart that displays 72.76% Users/Sessions and then edits the Users/Sessions metric definition by selecting the Type icon next to the field name.

Learn more about how blending works:

Was this helpful?

How can we improve it?
true
What's new in Looker Studio?

Learn about new features and recent changes. Looker Studio release notes live on Google Cloud.

Search
Clear search
Close search
Google apps
Main menu
6604597330451779996
true
Search Help Center
true
true
true
true
true
102097
false
false