Relationship

A.I Hub
4 min readMay 2, 2023

--

In this article, we will walk you through the step by step guide of how to create a relationships in power bi.

Step 1: “Load a Dataset”

If you want to load your dataset, simply click on the “Get Data” button in the data group on the “Home Tab”. once you click on that it will show a drop-down menu with multiple data sources, select “Excel workbook” from there and click on that.

Once, you click on that it brings another dialog box, where you can pull your data file from your local system, select your file and click on “Open” button located at the bottom right corner of the dialog box.

Once, you are done with that it will bring a navigator dialog box, from there you can select your sheet from the left hand side and after that, simply click on the “Check Box” and select your “All” sheet. once you select, than click on “Load” button located at the bottom right corner of the dialog box for saving your changes.

Step 2: “Create Relationships Between Tables”

To create a relationship between two tables simply, click on the “Manage relationships” button in the modeling tab on the ribbon.

Step 3: “Review Your Data Table”

In the “Data” view, you will see all the tables you have loaded. Review the tables and ensure they are structured correctly. The tables should have a column that uniquely identifies each row and the column names should be meaningful.

Step 4: “Add a Relationship”

In the “Manage Relationships” dialog box, click on the “New” button to add a new relationship.

Step 7: “Select The Columns”

Select the columns that will be used to create the relationship.

1- From “Orders” sheet — Select “Sub-category column. (First Sheet)

2- From “Orders$FiltersDatabase” sheet — Select “Sales” column. (Second Sheet)

Step 8: “Choose The Cardinality”

Choose the cardinality of the relationship. The cardinality defines the number of records in each table that will be associated with the other table.

The options are:

  • One to Many
  • Many to One
  • Many to Many

In our case, we select “many-to-many” cardinality.

Step 9: “Set The Cross Filter Direction”

Set the cross filter direction of the relationship. The cross filter direction defines how filters are applied across the relationship.

The options are:

  • Single
  • Both

In our case, we select “Both” cross filter direction from the dialog box.

Step 10: “Save The Relationship”

Click the “OK” button to save the relationship.

Conclusion:

we will exploring the concepts of relationships and along with that we also have some glimpses how to set options in the relationships dialog box and also understanding the building blocks of what is a relationship exactly is in terms of that when we relate any column to any other column in data table.

--

--

A.I Hub
A.I Hub

Written by A.I Hub

We writes about Data Science | Software Development | Machine Learning | Artificial Intelligence | Ethical Hacking and much more. Unleash your potential with us

No responses yet