Relationship in Power Pivot
Power Pivot

Create Relationship in Power Pivot

In this article, we have explained, how to create relationship in Power Pivot data model. We have taken 2 dimension table and once fact table.

What is Power Pivot?

Power Pivot is an Excel add-in you can use to perform powerful data analysis and create sophisticated data models. With Power Pivot, you can mash up large volumes of data from various sources, perform information analysis rapidly, and share insights easily.

In both Excel and in Power Pivot, you can create a Data Model, a collection of tables with relationships. The data model you see in a workbook in Excel is the same data model you see in the Power Pivot window. Any data you import into Excel is available in Power Pivot, and vice versa.

In this example, we have taken 2 dimension table (Location Master and Employee Master) and one fact table (Sales).

How to create the relationship in Power Pivot Data Model?

Creating table relationships requires that each table has a column that contains matching values. For example, in this example we have City in Sales Table (Fact Table) and Location in Location Master Table (Dimension Table).

  • In the Power Pivot window, click Diagram View. The Data View spreadsheet layout changes to a visual diagram layout, and the tables are automatically organized, based on their relationships.
  • Right-click a table diagram, and then click Create Relationship. The Create Relationship dialog box opens.
  • If the table is from a relational database, a column is preselected. If no column is preselected, choose one from the table that contains the data that will be used to correlate the rows in each table.
  • For Related Lookup Table, select a table that has at least one column of data that is related to the table you just selected for Table.
  • For Column, select the column that contains the data that is related to Related Lookup Column.
  • Click Create.

Alternatively, you can simply pick a column form 1st table in diagram view and drag on the other table’s matching column.

Relationship in Power Pivot
Relationship in Power Pivot

Once you have created the relationship successfully, you can create the pivot table just click on Pivot table button. Now all the tables will be available in Pivot table.

Click here to download the practice file

Watch the step by step video tutorial:

PK
My Name is PK. I am founder of PK-AnExcelExpert.com. I am a Microsoft Certified Professional. I have more than 10 years of experience in Data Visualization, Excel Automation and dashboard creation. Excel is my passion and I like to do always something innovative in Excel and share it with other people.
https://www.pk-anexcelexpert.com