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.

Table Sales
Sale IDDateNameTypeCityBrandModelCategoryQtyPriceAmount
V0011/15/2024OrvaneCompanyNew YorkVelmoRanoSedan1025,000250,000
V0023/8/2024KumoraCompanyNew YorkKordanKentaSUV350,000150,000
V0035/20/2024RibeliaCompanyChicagoKordanAtlaSedan425,000100,000
V0049/12/2024MovaraCompanyChicagoVelmoLinoCity car1010,000100,000
V00511/25/2024NorthelCompanyTorontoKordanAtlaSedan625,000150,000
V0061/10/2025OrvaneCompanyNew YorkVelmoRanoSedan825,000200,000
V0072/18/2025TalvioCompanyNew YorkKordanKentaSUV350,000150,000
V0083/27/2025KumoraCompanyNew YorkVelmoLinoCity car1510,000150,000
V0095/6/2025RibeliaCompanyChicagoKordanAtlaSedan625,000150,000
V0107/14/2025MovaraCompanyChicagoKordanKentaSUV350,000150,000
V0119/30/2025Sam LeeIndividualTorontoKordanKentaSUV250,000100,000
V01212/2/2025NorthelCompanyTorontoVelmoLinoCity car510,00050,000
Table: Sales (12 rows)

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.

Tip

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.”

Table visual, The “Revenue” measure by city, from the flat table
CityRevenue
Chicago500,000
Pari200,000
New York700,000
Toronto300,000
Total1,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?

Key takeaways
  • 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.