Hello! Welcome back.
In our last lesson, we spent time in the Power Query Editor, transforming and cleaning individual tables to ensure our data quality is high. This is a crucial step, but data rarely lives in isolation. A financial analyst might have one table with daily stock prices, another with company fundamentals, and a third with economic indicators. The real power comes from connecting them.
This lesson is about building the "brain" of your Power BI report: the data model. Our goal is to describe the relationship model in Power BI and create simple relationships between data tables. You'll learn how to teach Power BI how your different tables relate to one another, which unlocks the ability to create powerful, integrated visualizations.
1. From Tables to a Model: The "Why"
Before we jump into Power BI, it's important to understand a few key concepts. When you have multiple tables, you need a logical structure to connect them. This structure is called a data model. A well-designed model is the foundation of any good report.
The most common and effective way to structure a data model in Power BI is by using a star schema. This involves two types of tables:
- Fact Tables: These tables record business events or transactions. They typically contain numerical data you want to aggregate (like sales amount, shares traded, profit). For your interest in financial markets, a fact table could be a list of every stock trade you've executed, containing columns like
Date,Ticker,Shares, andPrice. Fact tables are usually very long. - Dimension Tables: These tables describe the "who, what, where, when, why" of your facts. They contain descriptive attributes. For our stock trade example, you might have a
Companiesdimension table with columns likeTicker,CompanyName, andSector, and aCalendardimension table with columns likeDate,Month, andYear. Dimension tables are usually much shorter than fact tables.
In a star schema, a central fact table is connected to several surrounding dimension tables, looking like a star.

To get a clear, practical explanation of these concepts, the following video is an excellent resource.
Learn Data Modelling & Star Schema for Power BI in 20 minutes
This video from Chandoo provides a fantastic introduction to data modeling. It uses a simple analogy of a chocolate company to explain what fact tables, dimension tables, and the star schema are.
Please watch the first part of the video from the beginning to 09:12. Focus on understanding the difference between the 'shipments' table (the fact table) and the 'product', 'people', and 'calendar' tables (the dimension tables).
2. Building Relationships in Power BI
Now that you understand the concepts, let's apply them in Power BI. The relationships between your tables are managed in the Model view.
When you load data, Power BI often tries to autodetect relationships for you by looking for columns with the same name in different tables. This is often helpful, but it's essential that you know how to check, edit, and create these relationships manually to ensure your model is correct.
Creating and Managing Relationships
There are two main ways to create a relationship:
- Drag and Drop: In the Model view, you can click on the key column in one table (e.g.,
Tickerin your Companies table) and drag it onto the corresponding column in the other table (e.g.,Tickerin your Trades table). - Manage Relationships Dialog: You can use the "Manage relationships" button in the ribbon to get a more detailed dialog box for creating and editing connections.
Let's see this in action.
Learn Data Modelling & Star Schema for Power BI in 20 minutes
Continuing with the Chandoo video, let's see how he takes the tables and builds the star schema in Power BI's Model view.
Watch from 09:12 to 14:02. Observe how he loads the data and then goes to the Model view. Pay attention to how Power BI automatically created some relationships and how he manually creates the missing one by dragging the date columns.
3. Understanding Relationship Properties
When you create a relationship, you're creating a line between two tables. But this line has important properties that define how it works. When you double-click a relationship line, the "Edit relationship" dialog box opens. The two most important settings are Cardinality and Cross-filter direction.
Cardinality
Cardinality describes the nature of the relationship between the two tables. The most common type in a star schema is Many-to-One (*:1).
- In our example, the
Tradestable (the fact table) has many entries for a single company. - The
Companiestable (the dimension table) has only one entry for that same company. - Therefore, the relationship is Many-to-One from Trades to Companies. The
1side is on the dimension table, and the*(many) side is on the fact table.
How to Create and Manage Relationships in Power BI | Microsoft Power BI for Beginners
The video from Alex The Analyst provides a very clear, concise explanation of the different cardinality options.
Watch from 02:18 to 04:30. He explains how to edit a relationship and provides a great walkthrough of the cardinality options, focusing on the common one-to-many relationship.
Cross-Filter Direction
This setting determines how filters flow between tables. A small arrow on the relationship line indicates the direction.
- Single: This is the default and most common setting. It means that filters flow from the "one" side to the "many" side. For example, if you filter your report to show only the "Technology" sector from your
Companiestable, that filter will flow "downhill" to theTradestable, showing you only the trades for tech stocks. - Both: This allows filters to travel in both directions. This can be useful in some complex models, but for a simple star schema, Single is almost always the correct and safer choice. Using "Both" incorrectly can lead to ambiguity and unexpected results.
The true power of data modeling comes alive when you see how filters work.
Learn Data Modelling & Star Schema for Power BI in 20 minutes
Let's go back to the Chandoo video for what is perhaps the best explanation of filter propagation. He demonstrates what happens to a chart when a slicer is used and how the relationships make it all work.
Watch from 14:02 to 21:11. This is a crucial section. Pay close attention to how selecting 'New Zealand' in the slicer (a dimension) filters the sales data (the fact table) to update the chart. He even deletes the relationship to show you what happens when it's missing—this really drives the point home.
Test your understanding!
You have loaded two tables into Power BI for your personal portfolio analysis:
- Portfolio Holdings: Contains a unique list of every stock you own. Columns are
Ticker,CompanyName, andIndustry. - Dividend Payouts: Contains a record of every dividend payment you've received. Columns are
PaymentDate,Ticker, andDividendAmount.
You want to create a visual that shows total DividendAmount by Industry. To do this, you need to create a relationship between the two tables in the Model view.
- Which column would you use to connect the tables?
- What would the cardinality of this relationship be? Which table is on the "one" side and which is on the "many" side?
Show answer
- You would connect the tables using the
Tickercolumn, as it's the common field that uniquely identifies a stock in both tables. - The cardinality would be One-to-Many (1:*).
- The "one" side is the
Portfolio Holdingstable because it contains a unique list where each ticker appears only once. This is your dimension table. - The "many" side is the
Dividend Payoutstable because a single stock (ticker) can pay you dividends many times over the years. This is your fact table.
- The "one" side is the
For further reading and to have as a reference, Microsoft's official documentation is an excellent resource.
Create and Manage Relationships in Power BI Desktop
This official guide from Microsoft Learn provides comprehensive details on everything we've discussed. You don't need to read it all now, but it's a great page to bookmark for future reference.
Briefly scan the sections 'Create a relationship manually', 'Configure more options' (especially the parts on Cardinality and Cross filter direction), and the tutorial under 'Understanding relationships'. This will reinforce what you saw in the videos with text-based instructions.
Conclusion
You have now learned the fundamentals of data modeling in Power BI, which is a massive step forward. Moving beyond flat files and single tables into a relational model is what separates basic reporting from true business intelligence.
Key Takeaways:
- A data model connects multiple tables so they can work together.
- The star schema, with a central fact table and surrounding dimension tables, is the ideal structure.
- Relationships are created in the Model view by connecting common columns (keys).
- Cardinality defines the relationship type, with Many-to-One (*:1) being the most common.
- Cross-filter direction controls how filters flow, typically from the "one" side (dimension) to the "many" side (fact).
In our previous lessons, we imported and cleaned data. Today, we connected it. Now, our data model is ready. In the next lesson, we will finally dive into the Report view and start creating our first basic visualizations—bar charts, line charts, and tables—to bring your financial data to life.
Can't find a good explanation? Sign up and we'll make it for you
Sign up