Cleaning and Transforming Data Using Power Query
Lesson 4: Cleaning and Transforming Data Using Power Query
In this lesson, you'll learn how to clean and prepare your data using the Power Query Editor in Power BI Desktop.
🧹 What is Power Query?
Power Query is a data transformation tool built into Power BI. It allows users to shape, clean, and enrich their data without writing code.
- Uses a GUI-based editor.
- Supports over 300 transformations.
- Runs on the M language under the hood.
⚙️ Opening the Power Query Editor
- After connecting to a data source, click Transform Data.
- The Power Query Editor window will open with a preview of your data.
You can now apply transformations step by step.
🔧 Common Data Transformations
- Remove Columns/Rows: Delete unnecessary data.
- Filter Rows: Keep only relevant records.
- Change Data Types: Set fields as Date, Text, Number, etc.
- Split Column: Break a single column into multiple parts.
- Merge Columns: Combine multiple columns into one.
- Replace Values: Clean up typos or fix inconsistencies.
- Group By: Aggregate data (e.g., sum by category).
- Add Column: Create custom fields using formulas or logic.
🪜 Understanding Applied Steps
Each transformation you apply is listed in the Applied Steps pane. You can:
- Rename steps.
- Delete or reorder them.
- Edit steps to change behavior.
This makes Power Query transformations transparent and easy to maintain.
✅ Closing and Loading Data
- Once your data is ready, click Close & Apply.
- Power BI will load the cleaned data into the data model.
You can now build reports using clean, structured data.
📝 Summary
Power Query is a powerful no-code tool for cleaning and transforming your data. With it, you can handle missing data, fix column types, and shape your datasets exactly how you need them.
✅ Next Lesson
Lesson 5: Data Modeling and Relationships in Power BI
تعليقات
إرسال تعليق