How to create relationships in Power BI
Understanding Power BI relationships and how to create them ensures your visuals filter and slice the way you expect. Learn more about Power BI relationships here.
If you’ve worked with multiple tables and had trouble with filters and slicers not producing the results you expect, it might not exactly be an error on your part. When combining data from multiple tables, Power BI relies on relationships between those tables. If there are no relationships or if you haven’t created the right relationship, your visual will most likely return an error. These errors can cause a lot of frustration and be difficult to fix.
In this tutorial, we’ll discuss what Power BI relationships are, how Power BI sometimes automatically creates them for you and how you can create them manually.
I’ll be demonstrating using Microsoft Power BI desktop on a Windows 10 64-bit system, but you can also use Power BI service for this task. To follow along, you can download the demonstration .pbix file here or work with your own data. This file contains three tables from Adventure Works Sales, which you can download from GitHub.
What relationships are in Power BI?
If you’re designing dashboards in Power BI and you’re not familiar with relationships, you’re at a disadvantage. Relationships between Power BI tables are important for pulling data together in meaningful ways for visuals. For instance, if order data and customer data are stored in separate tables — as they should be — you can’t reconcile an order to a specific customer without a relationship between the two tables.
Think of these relationships as you would your family relationships. You have a parent who may have other children. The relationship between you and this parent is a one-to-one relationship because there’s only one parent and one you in the equation. However, the relationship between your parent and all their children represents a one-to-many relationship.
There are three main types of relationships to consider when working in Power BI. Don’t worry too much about understanding these three types of relationships, because Power BI usually does a great job of taking care of relationships for users. However, a basic understanding will help for those times when you have to figure it out yourself. Read More…