Home>Blogs>Power Pivot>Create Relationship in Power Pivot
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  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  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 . The 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.

Create Relationship
Relationship

Once you have 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:

 

Visit our YouTube channel to learn step-by-step video tutorials

Youtube.com/@PKAnExcelExpert

 

PK
Meet PK, the founder of PK-AnExcelExpert.com! With over 15 years of experience in Data Visualization, Excel Automation, and dashboard creation. PK is a Microsoft Certified Professional who has a passion for all things in Excel. PK loves to explore new and innovative ways to use Excel and is always eager to share his knowledge with others. With an eye for detail and a commitment to excellence, PK has become a go-to expert in the world of Excel. Whether you're looking to create stunning visualizations or streamline your workflow with automation, PK has the skills and expertise to help you succeed. Join the many satisfied clients who have benefited from PK's services and see how he can take your Excel skills to the next level!
https://www.pk-anexcelexpert.com