Power Query – Data Transformation
Module 3: Data Transformation Techniques
Objective
Clean and reshape data using Power Query’s built-in tools.
Files Used
Removing Rows and Columns
Steps:
- Load Survey_Results.xlsx
 - In Power Query Editor:
- Go to the Home tab → Remove Rows → Remove Blank Rows
 - Select columns to remove → Right-click → Remove Columns
 
 
Changing Data Types
Steps:
- Click the icon next to a column header (e.g. ABC123)
 - Choose data type (e.g. Whole Number, Date, Text)
 - Or: Transform tab → Data Type
 
Renaming Columns
Steps:
- Double-click the column name or
 - Right-click → Rename → Type new name
 
Filtering and Sorting
Steps:
- Click filter icon in column header
 - Use built-in filters or checkboxes
 - Click arrow again to access Sort Ascending / Sort Descending
 
Grouping Data
Steps:
- Select a column
 - Go to Transform tab → Group By
 - Choose operation: Sum, Count, etc.
 
Splitting Columns
Steps:
- Select a column (e.g. Full Name)
 - Go to Home tab → Split Column
 - Choose method (e.g. by delimiter)
 
Unpivoting Columns
Steps:
- Load Orders_2023.xlsx
 - Select month columns (e.g. Jan, Feb)
 - Go to Transform tab → Unpivot Columns
 
Reordering Columns
Steps:
- Drag columns to new position or
 - Right-click column → Move → choose direction
 
Duplicating and Referencing Queries
Steps:
- Right-click a query in the left pane
 - Choose:
- Duplicate – creates a full copy
 - Reference – creates a linked copy
 
 
Additional Exercise: Cleanup and Pivot Prep
Goal: Prepare survey data for analysis.
Steps:
- Remove rows with missing satisfaction scores
 - Change column names to lowercase
 - Group by satisfaction rating and count rows
 - Load results into a new sheet
 
Extension: Conditional Columns
Goal: Create a new column that classifies satisfaction as Positive/Neutral/Negative.
Steps:
- Go to the Add Column tab → Conditional Column
 - Name: `SatisfactionLevel`
 - Logic:
- If Satisfaction = 4 or 5 → "Positive"
 - If Satisfaction = 3 → "Neutral"
 - If Satisfaction = 1 or 2 → "Negative"
 
 - Click OK
 
→ Continue to Module 4: Automation and Parameters
Return to Main Page