Power Query – Power Pivot Overview: Difference between revisions
												
				Jump to navigation
				Jump to search
				
No edit summary  | 
				No edit summary  | 
				||
| Line 2: | Line 2: | ||
== Objective ==  | == Objective ==  | ||
Learn how to load data into the Data Model, build relationships, and use DAX measures in PivotTables.  | |||
== Files Used ==  | == Files Used ==  | ||
* [[Media:PowerPivot_SalesData.xlsx|Download PowerPivot_SalesData.xlsx]]  | * [[Media:PowerPivot_SalesData.xlsx|Download PowerPivot_SalesData.xlsx]]  | ||
== Enabling Power Pivot ==  | == Enabling Power Pivot ==  | ||
'''Steps:'''  | '''Steps:'''  | ||
# In Excel  | # In Excel → '''File''' tab → '''Options'''  | ||
#   | # Go to '''Add-ins'''  | ||
# At the bottom  | # At the bottom, choose '''COM Add-ins''' → click '''Go'''  | ||
# Check '''Microsoft Power Pivot for Excel''' →   | # Check '''Microsoft Power Pivot for Excel''' → click '''OK'''  | ||
#   | # The '''Power Pivot''' tab will appear on the ribbon  | ||
== Loading Data to Power Pivot ==  | == Loading Data to Power Pivot ==  | ||
'''Steps:'''  | '''Steps:'''  | ||
# Import   | # Import '''PowerPivot_SalesData.xlsx''' via Power Query  | ||
# In the Power Query Editor, click '''Close & Load To...'''  | # In the Power Query Editor, click '''Close & Load To...'''  | ||
#   | # Choose:  | ||
#* '''Only Create Connection'''  | #* '''Only Create Connection'''  | ||
#* Check '''Add this data to the Data Model'''  | #* Check '''Add this data to the Data Model'''  | ||
| Line 31: | Line 26: | ||
== Opening the Power Pivot Window ==  | == Opening the Power Pivot Window ==  | ||
'''Steps:'''  | '''Steps:'''  | ||
# Go to the '''Power Pivot''' tab   | # Go to the '''Power Pivot''' tab  | ||
# Click '''Manage'''  | # Click '''Manage'''  | ||
# This opens   | # This opens the Power Pivot window with your loaded table  | ||
== Creating Relationships ==  | == Creating Relationships ==  | ||
'''Steps:'''  | '''Steps:'''  | ||
#   | # Go to the Power Pivot window → '''Diagram View'''  | ||
# Drag fields   | # Drag and drop fields to link tables (if more than one table is present)  | ||
#   | # Or: go to the '''Design''' tab → '''Create Relationship'''  | ||
== Creating a DAX Measure ==  | |||
'''Steps:'''  | '''Steps:'''  | ||
# In   | # In Power Pivot window, click into the bottom row (under the table)  | ||
# Type   | # Type:  | ||
<syntaxhighlight lang="dax">  | <syntaxhighlight lang="dax">  | ||
Total Revenue := SUM([Revenue])  | Total Revenue := SUM([Revenue])  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
# Press Enter — the measure appears in the model  | |||
== Using Power Pivot in PivotTables ==  | |||
'''Steps:'''  | |||
# In Excel, go to '''Insert''' → '''PivotTable'''  | |||
# Choose: '''Use this workbook’s Data Model'''  | |||
# Build a PivotTable using fields from Power Pivot  | |||
== Additional Exercise: Create PivotTable with DAX Measure ==  | |||
'''Goal:''' Analyze revenue by region.  | |||
'''Steps:'''  | |||
# Build a PivotTable based on the Data Model  | |||
# Use `Region` as a row field  | |||
# Use `Total Revenue` as the values field  | |||
# Sort by revenue descending  | |||
== Extension: Add Calculated Column ==  | |||
'''Goal:''' Add a margin estimate.  | |||
'''Steps:'''  | '''Steps:'''  | ||
# In the Power Pivot window, click a new column  | |||
# In the   | # Use formula:  | ||
#   | <syntaxhighlight lang="dax">  | ||
EstimatedMargin := [Revenue] * 0.25  | |||
</syntaxhighlight>  | |||
# Use it in a new PivotTable analysis  | |||
----  | ----  | ||
→ Continue to [[Power Query – Summary and Exercises|Module 6: Summary and Final Exercises]]  | → Continue to [[Power Query – Summary and Exercises|Module 6: Summary and Final Exercises]]  | ||
Return to [[Power_Query_–_Basic|Main Page]]  | Return to [[Power_Query_–_Basic|Main Page]]  | ||
Revision as of 09:49, 19 June 2025
Module 5: Power Pivot Overview
Objective
Learn how to load data into the Data Model, build relationships, and use DAX measures in PivotTables.
Files Used
Enabling Power Pivot
Steps:
- In Excel → File tab → Options
 - Go to Add-ins
 - At the bottom, choose COM Add-ins → click Go
 - Check Microsoft Power Pivot for Excel → click OK
 - The Power Pivot tab will appear on the ribbon
 
Loading Data to Power Pivot
Steps:
- Import PowerPivot_SalesData.xlsx via Power Query
 - In the Power Query Editor, click Close & Load To...
 - Choose:
- Only Create Connection
 - Check Add this data to the Data Model
 
 - Click OK
 
Opening the Power Pivot Window
Steps:
- Go to the Power Pivot tab
 - Click Manage
 - This opens the Power Pivot window with your loaded table
 
Creating Relationships
Steps:
- Go to the Power Pivot window → Diagram View
 - Drag and drop fields to link tables (if more than one table is present)
 - Or: go to the Design tab → Create Relationship
 
Creating a DAX Measure
Steps:
- In Power Pivot window, click into the bottom row (under the table)
 - Type:
 
Total Revenue := SUM([Revenue])
- Press Enter — the measure appears in the model
 
Using Power Pivot in PivotTables
Steps:
- In Excel, go to Insert → PivotTable
 - Choose: Use this workbook’s Data Model
 - Build a PivotTable using fields from Power Pivot
 
Additional Exercise: Create PivotTable with DAX Measure
Goal: Analyze revenue by region.
Steps:
- Build a PivotTable based on the Data Model
 - Use `Region` as a row field
 - Use `Total Revenue` as the values field
 - Sort by revenue descending
 
Extension: Add Calculated Column
Goal: Add a margin estimate.
Steps:
- In the Power Pivot window, click a new column
 - Use formula:
 
EstimatedMargin := [Revenue] * 0.25
- Use it in a new PivotTable analysis
 
→ Continue to Module 6: Summary and Final Exercises
Return to Main Page