
Dan Patiño
AI Strategy & Innovation at Coderhouse
Data
Power BI data modeling is the work of organizing the tables behind a report, deciding which tables hold events and which hold descriptions, and connecting them with relationships so filters flow the right way. It happens before you build a single chart, and it decides whether your totals, slicers and DAX measures return the right numbers. Most "Power BI is giving me the wrong total" problems are not formula problems at all; they are model problems.
This guide explains how analysts design a Power BI model: the table types, how relationships work, the settings that cause the most confusion, and a step-by-step process you can apply to your next report.
Why the data model matters more than the visuals
A Power BI report is only as reliable as the model underneath it. When a manager clicks a region in a slicer, Power BI follows the relationships in your model to decide which rows of sales, costs or tickets should be counted. If a relationship is missing, points the wrong way or connects the wrong columns, the visual still renders, it just shows a number nobody should trust.
A good model also makes reports faster and easier to maintain. Smaller, well-shaped tables compress better, measures stay short, and the next analyst can understand the report without reverse-engineering it.
Fact tables and dimension tables
Microsoft's own guidance on star schema design for Power BI starts with two kinds of tables:
Fact tables store events or transactions: each sale, each order line, each support ticket, each website session. They are long, they have numeric columns you add up (amount, quantity, minutes) and key columns that point to dimensions.
Dimension tables describe the things involved in those events: customers, products, stores, dates, employees. They are shorter and hold the attributes people filter and group by, such as category, city or segment.
Arrange them as a star schema: one fact table in the center, dimensions around it, each connected by a one-to-many relationship. If the term is new, our explainer on what a star schema is and why analytics depend on dimensional modeling covers the theory in more depth.
How relationships work in Power BI
A relationship connects a column in one table to a column in another, usually a product ID in the sales table to the same ID in the products table. Microsoft documents the options in Create and manage relationships in Power BI Desktop. Three settings matter most.
Cardinality
One-to-many is the normal case: one product appears in many sales rows. One-to-one usually signals that two tables should be merged. Many-to-many exists for real situations (for example, budgets stored by month and category while sales are stored by day and product), but it is a common source of inflated totals, so treat it as a deliberate choice rather than a default.
Cross-filter direction
By default, filters flow from the "one" side to the "many" side: picking a product category filters the sales table. Setting a relationship to filter in both directions can look like a quick fix when a slicer does not behave, but Microsoft's guidance on bi-directional relationships recommends using it sparingly, because it can create ambiguous filter paths and slow reports down.
Active and inactive relationships
Only one relationship between two tables can be active. If your sales table has both an order date and a ship date, connect both to the date table, keep one active and activate the other inside specific measures with the DAX function USERELATIONSHIP.
A step-by-step process for designing your model
Here is a process that works for most first reports, such as a sales or operations dashboard built from exports.
Write down the questions. List the five to ten questions the report must answer ("revenue by region by month", "top products by margin"). The questions tell you which facts and dimensions you need.
Identify the grain of each fact table. Decide what one row means: one order, one order line, one day per store. Mixing grains in one table is the root of many double-counting bugs.
Split flat exports into facts and dimensions. A wide export with customer name, city, product name and amount on every row should become a sales fact plus customer and product dimensions. Do this shaping in Power Query, which our guide to cleaning and shaping data with Power Query walks through.
Make sure every dimension has a unique key. Duplicate product IDs in the product table will break one-to-many relationships or force a many-to-many one.
Add a proper date table. Create a table with one row per day covering your full date range, add columns like month, quarter and fiscal year, and mark it as a date table. Microsoft explains the options in its date table guidance. Time intelligence in DAX depends on it.
Create relationships from dimensions to facts. Keep them one-to-many with single-direction filtering unless you have a specific reason not to.
Hide what report users should not touch. Hide foreign key columns in fact tables so people slice by the dimension attributes instead.
Write measures, not calculated columns, for totals. Once the model is right, measures stay simple. Our primer on DAX and the first Power BI formulas analysts learn picks up from here.
Test with numbers you already know. Compare a few totals against the source system or a trusted spreadsheet before anyone sees the report.
Common data modeling mistakes
One giant flat table. It works for a quick chart but becomes slow and hard to filter correctly as the report grows.
Bi-directional filters everywhere. They hide design problems and can produce totals that change depending on which slicer was clicked first.
Snowflaking without need. Splitting product into product, subcategory and category tables adds joins that rarely help in Power BI; flattening them into one product dimension is usually simpler.
Using the date column inside the fact table for time analysis. Without a dedicated date table, month-over-month and year-to-date calculations become fragile.
Ignoring grain. Joining a monthly budget table directly to daily sales without a plan leads to repeated budget values and inflated totals.
How data modeling fits into an analyst's skill set
Data modeling sits between data preparation and analysis. The same thinking applies whether you build the model in Power BI, write SQL views for a dashboard tool or design tables in a warehouse: define the grain, separate events from descriptions and make relationships explicit. Analysts who can explain their model are the ones trusted to own reporting for a team.
FAQ
Do I need to know SQL to model data in Power BI?
Not to start, since Power Query handles most shaping visually. SQL helps a lot once your sources are databases, because you can prepare clean fact and dimension tables before they reach Power BI.
Is a star schema always the right choice?
For most reporting models in Power BI, yes. Exceptions exist, but a star schema is the safest default and the one Microsoft recommends.
What should a Power BI course teach about modeling?
Look for a course where you build a model from messy source data, set relationships yourself and get feedback on a finished dashboard project, rather than one that only demonstrates visuals on a pre-built dataset.
Keep learning with Coderhouse
If you want guided practice turning raw business data into trustworthy analysis, our Data Analytics Course runs for 11 weeks with one live class per week and roughly 6 to 8 hours of work per week, covering SQL, Python, visualization and data storytelling, statistics and experimentation, and a capstone. If you are a developer who wants to build AI applications on top of data, the AI Engineering Course is the next step.
I'm Dan Patiño, head of AI Strategy & Innovation at Coderhouse. My day-to-day work involves merging the tactical management of e-commerce (CRO, Email Marketing and SEO) with the development of disruptive solutions. I specialize in building internal AI-powered apps to automate tasks and boost innovation within the team. I firmly believe that technology is strategy's best ally. To dive deeper into my professional journey, I'll be waiting for you on my LinkedIn profile.