Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Excel Tutorial
  • Excel Formulas
  • Excel Shortcut Keys
  • Data Analysis in Excel
  • Formatting in Excel
  • Excel Workbooks
  • Statistical Functions
  • Data Visualization in Excel
  • Pivot Tables in Excel
  • MS Excel Quiz
  • Excel Interview Questions
  • Advance Excel
Open In App
Next Article:
Excel Power Pivot - Managing Data Model
Next article icon

Excel Power Pivot - Managing Data Model

Last Updated : 10 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Power Pivot is something that helps us in relating between two different data sets which are in two different worksheets. We can manage and relate any type of data using Power Pivot. It is used for data analysis and creates many different data models. we can collect large data from different sheets and can apply or perform any relation between them. Power Pivot is usable for tables only. If we have any dataset then we need to convert that dataset into tables before using Power Pivot.

Managing Data Model

When data is formed by combining various sources, then those types of data are formed by  Data Modals.

It is created by an existing relationship between two or more tables. It is created automatically when we import two or more tables from a database. Let's understand how to Manage Data Models using Excel Power Pivot with the help of an example.

Step 1: Open Ms-Excel and save it as any name let's save it as "Managing Data Model". 

Then we need to take any dataset, Let's say we take, three different datasets whose names are Orders, Products, and Return respectively. and our task is to manage the whole data in Power Pivot and find the Sum of Sales in each Region.  

Dataset of Order

Orders-dataset

Dataset of Products

Product-dataset

Dataset of Return

Return-dataset

Step 2: Now, before going to power pivot we need to convert this dataset into tables because Power Pivot is usable for Tables only.  

So, convert this dataset into tables by simply selecting any cell of the Order data set -> then pressing ctrl + t -> then selecting OK. 

Similarly, repeat these steps to convert them into Tables for the Product dataset and Return dataset.  When you convert your dataset into tables then it will show like images mentioned below : 

Conversion of Order Dataset into the table

Table-of-orders

Conversion of Product Dataset into the Table

Table-of-products

Conversion of the Return Dataset into the Table

Table-of-return

Step 3: Now, we need to understand that, we aim to find the Sum of Sales in each region. So the region column is in the first dataset i.e.: Orders. And Sales Column is in the second dataset i.e.; Products so, here PowerPivot came in the role to bring them in a single comparison. To do that, first rename all the table names From Table1, Table2, and Table3 to Orders, Products, and Return respectively. 

To rename a table name just click on any cell of that particular table -> go to Table design -> Rename table name at the top left corner.

Rename Table 1 to Orders

Power-pivot-for-options

Rename Table 2 to the Product

Power-pivot-for-products

Rename Table 3 to Return

Power-pivot-for-return

Step 4: Then go to Option Slide -> go to Power Pivot -> Choose "Add to Data Model" -> then go back to Excel -> Now, Go to Products slide -> then repeat the same step for Product slide also -> then repeat the same step for return slide. 

The common column between the Order dataset and the product dataset is product_id and the common column between the ordered dataset and return dataset is Order_id.  

Open the previous Power Pivot Slide of Order tab -> go to the design tab -> Create Relationship -> Choose Product_id from Order Dataset and Product dataset.

Choosing Product_id from the Ordered Dataset

Product-id-from-Order-dataset

Choosing Product_id from the Product Dataset

Product-id-from-product-dataset

Similarly, Choose Order_id from the Order dataset and Return dataset. 

Choosing Order_id from the Ordered Dataset

Order-id-from-Order-and-Return-dataset

Step 5: You can check Your relationship by going to manage the relationship.

Manage-relationships

Here, you can see that both relationships are active. 

Step 6: At last go to the Home tab -> Choose Pivot Table -> it will show you a pop-up -> press ok -> it will bring you to a new slide inside your previous Excel file.

Pressing-ok

It will bring you to a new slide inside your Excel file.

New-slide

From Pivot Table Fields, Drag "Region" from the Order dataset to Rows.

Dragging-region-to-rows

Then, From the product dataset, Drag Sales to Values.

Dragging-sales-to-values

So by doing this way, we managed our data using Power Pivot. In the last above-mentioned image we can see that it is showing the sales done in each region, which is impossible to do without using Power Pivot because Region and sales columns are in two different datasets, if we try to do it with a normal Pivot table then it not be happening, a normal pivot table can be used if these two columns of regions and sales are present in any single dataset. 

Managing Relationship 

Users can edit or delete an existing relationship in the data model.

Steps to see all the Existing Relationships in the Data Model

Step 1: Click the design tab in the Power pivot window.

Step 2: In the Relationship group, click on Manage the Relationship.  

A dialog box appears with all the existing relationships in the data model.

Steps to Edit a Relationship

Step 1: Select the relationship you want to edit.

Step 2: Select the edit button. A dialog box appears for the edit relationship.

Step 3: Now you can make the required changes. 

Step 4: The required changes will reflect on your data after clicking "OK".  

Steps to Delete the Relationship

Step 1: Select the relationship you want to delete.

Step 2: Select the delete button. 

Note: A alert message will pop up showing how the affected tables will affect the reports after deleting the relationship.

Step 3: Click Ok if you surely want to delete that relationship. The relationship is deleted.


Next Article
Excel Power Pivot - Managing Data Model

A

ankitkumarh15
Improve
Article Tags :
  • Excel
  • Technical Scripter 2022
  • excel
  • Excel-Power-Pivot
  • ExcelGuide

Similar Reads

    Loading Data with Power Pivot in Excel
    There are two ways to input data into Power Pivot: Data may be immediately loaded into PowerPivot, populating the database, or it can be loaded into Excel and added to the Data Model. You may either create connections and/or use the existing connections to import data into the Power Pivot Data Model
    5 min read
    Data Models in Excel Power View
    The Data Model gives us the ability to work with multiple tables and integrate them with each other using a specified relationship to build a relational database inside Microsoft Excel. It helps to work with larger datasets and provides us with a huge set of interactive features for creating, modify
    5 min read
    Exploring Data with Excel Power Pivot
    Power Pivot is an Excel one can use to perform intense information investigation and make modern information models. With Power Pivot, we can squash up enormous volumes of information from different sources, perform data examination quickly, and share experiences without any problem. In both Excel a
    7 min read
    Power Pivot for Excel
    Power Pivot serves as an Excel add-on enabling robust data analysis and the creation of advanced data models. This tool facilitates the integration of extensive data from diverse sources, enabling swift information analysis and seamless sharing of insights. Whether working in Excel or Power Pivot, u
    10 min read
    Data Modeling in Power BI
    Data modeling is the process of identifying, organizing and defining the types of data a business collects and the relationships between them. It uses diagrams, symbols and textual definitions to visually represent how data is captured, stored and used. A well-designed data model helps:Understand da
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences