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

  1. After connecting to a data source, click Transform Data.
  2. 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

  1. Once your data is ready, click Close & Apply.
  2. 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

تعليقات

المشاركات الشائعة من هذه المدونة

Entity Framework - ما هو ORM؟ ونبذة عن Dapper وNHibernate

1.1 SQL Introduction

Entity Framework - مقدمة عن Entity Framework