Notes – Power Query in Power BI

What is Power Query?

Power Query is a data transformation tool in Power BI.
It helps you clean, reshape, and prepare data before using it for analysis or visualization.

It works in a no-code/low-code environment—perfect for beginners.


Where is Power Query Used?

Power Query is available in:

  • Power BI Desktop
  • Excel
  • Microsoft Dataflows (in Power BI Service)

In Power BI, it opens when you click “Transform Data”.


Key Features of Power Query


FeatureDescription
Step-by-step editorEach action (like renaming, removing columns) is saved as a step
No coding neededBuilt with a graphical interface – drag, drop, and click
Supports M languageBehind the scenes, it uses a powerful formula language called M
Reusable queriesYou can reuse query steps in multiple reports or tables
Connects to many sourcesExcel, CSV, Web, SQL Server, SharePoint, APIs, etc.

Common Tasks in Power Query

  • Remove columns or rows
  • Rename columns
  • Change data types
  • Filter and sort data
  • Merge or append tables
  • Replace values
  • Pivot and unpivot data

Power Query Workflow

  1. Connect to the data source
  2. Transform the data using available options
  3. Load the cleaned data into Power BI model

This is often called ETL:
Extract → Transform → Load


Real-World Example

You import a messy Excel file with:

  • Blank rows
  • Unnecessary columns
  • Wrong column names

Using Power Query, you:

  • Remove blanks
  • Rename columns
  • Filter relevant data

Now the data is clean and ready to use for reporting.


Power Query Interface Overview


SectionPurpose
Navigator PaneShows all queries and steps
Data Preview GridDisplays sample data from selected table
Ribbon ToolbarContains transformation options
Applied StepsLists each action taken on the data