What is a data model, and why do you need one?

Once the data from your accounting, CRM and planning tools sits in one place, you are not there yet. The tables arrive as the software delivers them: dozens of tables with codes, link tables and columns only the vendor understands. Anyone who builds a report directly on top of that has to work out again for every question which tables belong together.

A data model is the layer in between. You arrange the data so it matches the questions you ask: revenue per customer, hours per project, margin per product group. With fixed tables, fixed relationships and fixed definitions. Then everyone calculates the same way and every dashboard gives the same answer.

No central place for your data yet? Read data warehouse for SMEs: when you need one and when not first. This article is about the next step: how to organise the tables inside it.

Why not one big table, or simply the tables from your software?

Two routes seem obvious, and both get stuck sooner or later.

  • One big, flat table. Everything on one row: invoice line, customer name, region, account manager, product group. It feels clear, like an Excel list. But as soon as you want to add a second kind of data, such as booked hours or budgets, it no longer fits. You start duplicating rows, and then totals are counted twice.
  • The tables as the software delivers them. An accounting package or ERP is built to record transactions quickly and correctly, not to report on. A customer is spread across several tables, a status is a code. Every report builder solves that in their own way, and that is how two versions of revenue appear.

A star schema sits in between: a small number of tables, each with one clear role.

Facts and dimensions: which two kinds of tables do you need?

  • Fact tables hold events or measurements: invoice lines, orders, booked hours, payments, stock positions. Each row has a date, a few numbers you add up (amount, quantity, hours) and references to dimensions. Fact tables grow long.
  • Dimension tables describe the who, what, where and when: customers, products, employees, projects, branches and a date table. You filter and group on them. They are short and wide: few rows, many descriptive columns.

A handy test: if you want to add it up, it belongs in a fact table. If you want to filter or group on it, it belongs in a dimension. So product group is a column in the product dimension, not in the invoice line.

If you also record positions or changed customer data, they get a place in the same model. How that works, with snapshots and a change log, is covered in history in your data warehouse.

What does a star schema look like, and why does it suit Power BI?

In a star schema a fact table sits in the middle, with the dimensions around it. Each dimension is linked to the fact table with one relationship, through a key. Draw it and it looks like a star. If you have several fact tables, for example revenue and hours, they share the same dimensions. That way you can put revenue and hours per customer or per project side by side without anything being counted twice.

In its Power BI documentation, Microsoft recommends setting up data models along these lines (checked on 25 November 2026). The reasoning: every visual in a report sends a query to the model that filters, groups and summarises. Dimensions do the filtering and grouping, fact tables the summarising. That matches how Power BI works, and it makes the formulas (DAX) simpler.

The star schema was not invented for Power BI, by the way. It is a proven approach from the data warehouse world. That is an advantage in itself: whoever takes over the model later will recognise the structure.

Step by step: your data model in six steps

  1. Start with the questions. Write down the questions management asks every month. "What is the margin per product group?" "How many hours do we book on fixed-price projects?" They tell you which facts and dimensions you need.
  2. Choose the level of detail for each fact table. What is one row? One invoice line, one time entry per employee per day, one stock position per item per day. Fix that and do not mix it. A table holding both invoice lines and invoice totals will always double count somewhere.
  3. Build the dimensions. One table per subject, with a unique key and the columns you want to filter on. Bring together data that belongs together, even if the software spreads it across several tables. Product group and subgroup simply become columns in the product dimension.
  4. Create your own date table. One row per day, with columns for week, month, quarter, financial year and possibly working day. Every fact table refers to it. That way year-on-year comparisons work the same everywhere.
  5. Share dimensions between fact tables. Revenue and hours use the same customer dimension and the same project dimension. That is where most of the value is: one customer means the same thing everywhere.
  6. Fix the definitions. Does revenue include or exclude credit notes? What is an active customer? Write it down and calculate it once, in the model, not again in every report.

Filling these tables is the job of your data pipeline. How that works is covered in what is a data pipeline (ETL).

An example: an installation company with accounting, CRM and time tracking

A fictional example. An installation company with 40 employees uses an accounting package, a CRM and a time tracking tool. Management wants to see per project what has been invoiced, how many hours went into it and what the margin is. Today that happens in an Excel file the controller updates by hand every month.

The data model in the central database:

  • Revenue fact: one row per invoice line, with date, amount, quantity and references to customer, project and item.
  • Hours fact: one row per employee per project per day, with the number of hours and the cost per hour.
  • Customer dimension: name, segment, region and account manager, combined from accounting and CRM through the customer number.
  • Project dimension: project number, type (time and materials or fixed price), project manager and status.
  • Employee dimension and item dimension, with department and product group.
  • Date table with financial year and working days.

Because both fact tables share the same customer and project dimensions, one Power BI report shows revenue, hours and margin per project side by side. Even when the customer's name in the CRM differs slightly from the one in the accounting package. How to set up such a report so that people actually use it is covered in a Power BI dashboard people actually use.

Where does a data model go wrong?

  • Different levels of detail in one table. Invoice headers and invoice lines mixed together, and revenue is counted twice.
  • Two versions of the same dimension. A customer table from accounting and one from the CRM, each with its own relationship. Then one selection filters revenue but not hours.
  • Relationships between fact tables. Linking revenue directly to hours seems logical, but gives wrong totals. Let them meet only through shared dimensions.
  • Calculations redone in every report. If margin is calculated three ways in three reports, you have three margins. Calculate it once in the model.
  • Wanting too much at once. Start with one fact table and the dimensions that go with it. Expand once that works.

A good data model is also the basis for AI in your reporting. According to Microsoft, Copilot in Power BI gives better answers when facts and dimensions are clearly separated. More on that in Power BI Copilot: what AI does and does not do.

Help with the data model for your data warehouse

Setting up a data model that fits your questions and your software is exactly what we mean by data engineering. The systems we can already connect are listed under integrations, and the reports that run on top are covered under dashboarding. How such a project runs in phases is described in our approach. No central database yet? Start with a database for SMEs.