01.2The grain, or the level of detail of your data
Before going further, ask yourself one question about every table. What level of detail does it give? This level of detail is called the grain, or the granularity of the data. You read it in the rows and in the columns.
01.2.1Detail in the rows
Take two tables about the same sales. The first one has one row per sale.
| Sale ID | Date | Customer ID | Amount |
|---|---|---|---|
| V001 | 1/15/2024 | C001 | 250,000 |
| V002 | 3/8/2024 | C002 | 150,000 |
| V003 | 5/20/2024 | C004 | 100,000 |
| V004 | 9/12/2024 | C005 | 100,000 |
| V005 | 11/25/2024 | C006 | 150,000 |
| V006 | 1/10/2025 | C001 | 200,000 |
| V007 | 2/18/2025 | C003 | 150,000 |
| V008 | 3/27/2025 | C002 | 150,000 |
| V009 | 5/6/2025 | C004 | 150,000 |
| V010 | 7/14/2025 | C005 | 150,000 |
| V011 | 9/30/2025 | C007 | 100,000 |
| V012 | 12/2/2025 | C006 | 50,000 |
This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.
The second one has one row per month, with the month’s total.
| Month | Amount |
|---|---|
| Jan'24 | 250,000 |
| Mar'24 | 150,000 |
| May'24 | 100,000 |
| Sep'24 | 100,000 |
| Nov'24 | 150,000 |
| Jan'25 | 200,000 |
| Feb'25 | 150,000 |
| Mar'25 | 150,000 |
| May'25 | 150,000 |
| Jul'25 | 150,000 |
| Sep'25 | 100,000 |
| Dec'25 | 50,000 |
This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.
The first one is the most detailed, since each row is a sale. The second one groups the sales of each month, so its grain is coarser.
- With the first one, you can calculate revenue by month, by customer or by city, and find one specific sale.
- With the second one, you can only calculate revenue by month. The customer, the city and each individual sale are gone.
You can always group detailed rows, sales into months. You can never do the reverse. A monthly total no longer tells you which sales it is made of.
01.2.2Detail in the columns
Detail also shows in the columns. Here is a customer table with plenty of columns.
| Code | Name | Country | Region | City | Neighborhood | Type |
|---|---|---|---|---|---|---|
| C001 | Orvane | United States | New York | New York | SoHo | Company |
| C002 | Kumora | United States | New York | New York | Chelsea | Company |
| C003 | Talvio | United States | New York | New York | Harlem | Company |
| C004 | Ribelia | United States | Illinois | Chicago | Lincoln Park | Company |
| C005 | Movara | United States | Illinois | Chicago | Wicker Park | Company |
| C006 | Northel | Canada | Ontario | Toronto | Downtown | Company |
| C007 | Sam Lee | Canada | Ontario | Toronto | The Annex | Individual |
This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.
Here is another table, which describes the same customers with only three columns.
| Code | Name | City |
|---|---|---|
| C001 | Orvane | New York |
| C002 | Kumora | New York |
| C003 | Talvio | New York |
| C004 | Ribelia | Chicago |
| C005 | Movara | Chicago |
| C006 | Northel | Toronto |
| C007 | Sam Lee | Toronto |
This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.
Both tables have the same 7 rows. Customers describes each customer in far more detail than “Contacts.” For identical rows, more columns mean more description, and so a finer grain.
Quiz
The questions often rely on the course tables. Keep them in view in their floating window, which you can move and enlarge.
Question 1
The Customers table describes each customer with seven columns. The “Contacts” table describes the same customers with three columns. Which one has the finer grain?
Question 2
All you have is the total for each month. Can you get back to revenue by city?
Question 3
What level of detail should a table keep?
- The grain of a table is its level of detail. You read it in the rows, what each one stands for, and in the columns, what each one describes.
- You can always group detailed rows, but you can never get the detail back from a total.
- Keep the detail you need for your questions, and no more.