Stay organized with collections
Save and categorize content based on your preferences.
Suppose you are a school administrator and that you store information about the classes offered, the students who enroll in those classes, and the grades they receive in each class. You can use Looker Studio to track and visualize this information by using data blending.
Questions to answer
This example answers the following questions that you might have about the data:
Which students took which classes, and what grade did each student receive in each class?
What was the highest grade received in each class?
Which student received the highest grade in each class?
Sample data
Here's the data used in the examples.
Classes:
class_id
class_name
c1
Underwater basket weaving
c2
Home fusion made easy
c3
How to train an attack iguana
c4
Learn SQL for fun and profit
Students:
student_id
student_name
s1
Brett
s2
Rick
s3
Susanna
s4
Jennifer
Grades:
student_id
class_id
grade
s1
c1
2
s2
c1
99
s3
c1
65
s4
c1
3
s2
c2
38
s3
c2
88
s4
c2
48
s1
c3
7
s4
c3
32
s1
c4
94
s2
c4
63
s3
c4
75
s4
c4
20
Setup
The first step is to connect to your data by creating data sources in Looker Studio. The demonstration report uses Sheets for the underlying data, but you could also store this data in a database, such as BigQuery or MySQL.
Create a new report.
Add 3 data sources corresponding to the sample data:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Blending example: Classes, students, and grades\n\nSuppose you are a school administrator and that you store information about the classes offered, the students who enroll in those classes, and the grades they receive in each class. You can use Looker Studio to track and visualize this information by using data blending.\n| **See a demonstration report** : Copy and edit a [live demonstration report](https://lookerstudio.google.com/reporting/edb8c110-6946-4054-a287-8fe65fcce8f6/page/r7vQ) to see how blending works. (This report is available only in English.)\n\nQuestions to answer\n-------------------\n\nThis example answers the following questions that you might have about the data:\n\n- Which students took which classes, and what grade did each student receive in each class?\n- What was the highest grade received in each class?\n- Which student received the highest grade in each class?\n\nSample data\n-----------\n\nHere's the data used in the examples.\n\n**Classes**:\n\n**Students**:\n\n**Grades**:\n\n| **Tip:** Follow along with the examples in this document by making a copy of this data using [Google Sheets](https://docs.google.com/spreadsheets/d/1v74etUJflbLMfrfmlyAH2wFS99rcsVJrrRF6YmIAsW4/edit?usp=sharing).\n\nSetup\n-----\n\nThe first step is to connect to your data by creating data sources in Looker Studio. The demonstration report uses Sheets for the underlying data, but you could also store this data in a database, such as BigQuery or MySQL.\n\n1. Create a new report.\n2. Add 3 data sources corresponding to the sample data:\n 1. Classes\n 2. Students\n 3. Grades\n\nLearn how to [create and edit data sources](/looker/docs/studio/about-data-sources).\n\nQuestion 1: Students, classes, and grades received\n--------------------------------------------------\n\n**Question**: \"Which students took which classes, and what grade did each student receive in each class?\"\n\nTo answer this question, follow these steps:\n\n1. Create a new blend.\n2. Add a **Grades** table with the following dimensions:\n 1. `student_id`\n 2. `class_id`\n 3. `grade`\n3. Add a **Students** table with the following dimensions:\n 1. `student_id`\n 2. `student_name`\n4. Add a **Classes** table with the following dimensions:\n 1. `class_id`\n 2. `class_name`\n5. Join **Grades** to **Students** with `student_id`.\n6. Join **Grades** to **Classes** with `class_id`.\n7. Set both join operations to left outer.\n8. Save the blend and close the editor.\n9. Add a table to the report with the `student_name`, `class_name`, and `grade` fields.\n10. Sort the table by `student_name`, descending.\n\nYour table should look like this:\n\nQuestion 2: Highest grade by class\n----------------------------------\n\n**Question**: \"What was the highest grade received in each class?\"\n\nTo answer this question, follow these steps:\n\n1. Use the same blend as in [Question 1](#question_1).\n2. Add a table to the report.\n3. Add `class_name` as a dimension and `grade` as a metric.\n4. Edit the `grade` field as follows:\n 1. Change the name to `max_grade`.\n 2. Set the aggregation to **MAX**.\n5. Sort the table by `max_grade`, descending.\n\nYour table should look like this:\n\nQuestion 3: Highest grade by student by class\n---------------------------------------------\n\n**Question**:\"Which student received the highest grade in each class?\"\n\nTo answer this question, follow these steps:\n\n1. Create a new blend.\n2. Add a **Classes** table with the following dimensions:\n 1. `class_id`\n 2. `class_name`\n3. Add a **Grades** table, name it **Grades 1** , and add dimension `class_id`.\n4. Add `grade` as a metric, and set the aggregation to **MAX**.\n5. Rename `grade` to `max_grade`.\n6. Add the **Grades** table again, name it **Grades 2** , and add dimensions:\n 1. `student_id`\n 2. `class_id`\n 3. `grade`\n7. Add a **Students** table, with dimensions:\n 1. `student_id`\n 2. `student_name`\n8. Use **left outer** for each join.\n9. Join **Classes** to **Grades** with `class_id`.\n10. Join **Grades** to **Grades 2** with:\n 1. `class_id = class_id`\n 2. `max_grade = grade`\n11. Join **Grades 2** to **Students** with `student_id`.\n\n12. Save the blend and close the editor.\n\n13. Add a table to the report with the `student_name`, `class_name`, and `max_grade` fields.\n\nYour table should look like this:"]]