Facts and dimensions
Read the flat table and sort its columns into what happened (facts) and who, what and when (dimensions).
A flat export with forty columns works for one table visual. Add a second chart, a slicer and a measure that compares years, and the numbers start to repeat or go missing. A star schema splits the same data into one table of events and small tables that describe them.
Read the flat table
Take a sales export with one row per order line:
Order Date Customer City Segment Product Category Qty Amount
1001 2026-03-02 Anna Huber Vienna Retail Bike Bikes 1 480
1001 2026-03-02 Anna Huber Vienna Retail Helmet Gear 2 90
1002 2026-03-05 Marc Petit Lyon Business Bike Bikes 3 1440Anna's city and segment repeat on every line she buys, and so do the bike's category. That repetition is the clue.
Sort the columns into two kinds
Ask of each column: is it something that happened, or something that describes who, what or when?
Facts (what happened) Dimensions (who, what, when)
Order, Qty, Amount Customer, City, Segment
Product, Category
DateThe fact table keeps one row per order line with the numbers you add up and a key for each dimension. Each dimension table keeps one row per customer, product or day, with the columns you filter and group by.
Draw the star
Customer
|
Date ---- Sales ---- ProductEach dimension has a one-to-many relationship to the fact table: one customer, many sales lines. Filters flow from the dimension into the facts, so a slicer on Segment filters Sales, and every measure on Sales follows.
Why not leave it flat
- One place for each fact. A customer's city is stored once, so two lines can never disagree about it.
- Smaller model. The city is stored once per customer, not once per line. Power BI compresses repeated values well, but fewer columns on the biggest table still help.
- Time intelligence works. Year-to-date and same period last year need a date table with every day, which a flat table cannot be.
- New sources fit. A Budget table can share the Product and Date dimensions and sit in the same report as Sales.
Decide the grain
Write down what one row of the fact table means before building anything: here, "one product on one order". Every number in the fact table must be true at that grain. An order-level shipping cost on every line would be counted once per product, so it belongs in its own fact table at order grain, or split across lines on purpose.