01.1Extracted data often comes as a flat table
You have data in an Excel file, or you extract it from your company’s software. Let’s start there, with what you already have in hand.
01.1.1The flat table
The extracts you get from a piece of software or a database usually come as a flat table. That is the name for a single table that holds everything, both what happened and what describes it.
Take the sales of a car dealership, the one used as the example throughout this course. Each row tells the story of one sale, with its date, quantity, price and amount. These are the facts. On the same row, you also find the customer’s name, type and city, then the brand, model and category of the car sold. This is the descriptive data.
| Sale ID | Date | Name | Type | City | Brand | Model | Category | Qty | Price | Amount |
|---|---|---|---|---|---|---|---|---|---|---|
| V001 | 1/15/2024 | Orvane | Company | New York | Velmo | Rano | Sedan | 10 | 25,000 | 250,000 |
| V002 | 3/8/2024 | Kumora | Company | New York | Kordan | Kenta | SUV | 3 | 50,000 | 150,000 |
| V003 | 5/20/2024 | Ribelia | Company | Chicago | Kordan | Atla | Sedan | 4 | 25,000 | 100,000 |
| V004 | 9/12/2024 | Movara | Company | Chicago | Velmo | Lino | City car | 10 | 10,000 | 100,000 |
| V005 | 11/25/2024 | Northel | Company | Toronto | Kordan | Atla | Sedan | 6 | 25,000 | 150,000 |
| V006 | 1/10/2025 | Orvane | Company | New York | Velmo | Rano | Sedan | 8 | 25,000 | 200,000 |
| V007 | 2/18/2025 | Talvio | Company | New York | Kordan | Kenta | SUV | 3 | 50,000 | 150,000 |
| V008 | 3/27/2025 | Kumora | Company | New York | Velmo | Lino | City car | 15 | 10,000 | 150,000 |
| V009 | 5/6/2025 | Ribelia | Company | Chicago | Kordan | Atla | Sedan | 6 | 25,000 | 150,000 |
| V010 | 7/14/2025 | Movara | Company | Chicago | Kordan | Kenta | SUV | 3 | 50,000 | 150,000 |
| V011 | 9/30/2025 | Sam Lee | Individual | Toronto | Kordan | Kenta | SUV | 2 | 50,000 | 100,000 |
| V012 | 12/2/2025 | Northel | Company | Toronto | Velmo | Lino | City car | 5 | 10,000 | 50,000 |
This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.
Orvane, New York, Velmo and Rano are written twice, on V001 and on V006. Every new sale to Orvane will write them once more.
01.1.2Rows and columns
Like any table, a flat table has rows and columns. Each row describes one single thing, here a sale. Each column holds one single piece of information, with one type of value: numbers, text or dates.
Knowing what a row stands for is the first question to ask about any table. A table with 12 rows holds 12 sales, not 12 customers or 12 cars.
The level of detail of a table, what each row tells, is called its grain, or the granularity of the data. Here, each row tells one sale. You will meet this word again later.
The type of a column decides what you can calculate with it. Quantities and amounts add up. Names and cities can be counted, but not added.
01.1.3A flat table works in Power BI
The good news is that a flat table imported into Power BI is ready to use right away. You can drop its columns into a visual and write your first measures.
On one condition. Your data must be clean and correctly formatted.
- Each column has the right type. A date is stored as a date, an amount as a number.
- The same value is always written the same way, down to the last character.
A single typo is enough to throw a visual off. Here, sale V006 says “Pari” instead of “New York.”
| City | Revenue |
|---|---|
| Chicago | 500,000 |
| Pari | 200,000 |
| New York | 700,000 |
| Toronto | 300,000 |
| Total | 1,700,000 |
This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.
The visual shows one extra city, and New York loses the 200,000 of V006.
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 dealership’s flat sales table has 12 rows. What can you tell from that?
Question 2
On import, the Amount column of your flat table is stored as text. What can you calculate with it?
Question 3
In the flat table, sale V003, worth 100,000, is entered as “Madird” instead of “Chicago.” What does the visual of revenue by city show?
- A flat table keeps in a single table the facts, like the sales, and the descriptive data, like the customer and the product.
- Each row of a table describes one single thing. In the flat sales table, a row is a sale.
- A clean, correctly formatted flat table is ready to use in Power BI right away.