Power BI 5 min

What is Power Query?

Short answer

Power Query is a data connection and transformation tool built into Power BI, Excel, and Power Automate. It lets you import data from sources such as Excel files, databases, and web APIs, then clean, reshape, and combine it through a visual step-by-step interface, without writing SQL or scripts. Every action you take is recorded and can be refreshed automatically whenever the underlying data changes.

Power Query is the data preparation engine built into Power BI, Excel, and other Microsoft tools that lets you connect to, clean, and transform data before it reaches your report.

What Power Query does

Before data reaches a Power BI report, it usually needs cleaning up: inconsistent date formats, unnecessary columns, duplicate rows, or data spread across multiple files that need combining. Power Query is the tool that handles this preparation step. It sits between your raw data sources and the semantic model, and every transformation you apply, from renaming a column to merging two tables, becomes a recorded, repeatable step.

The interface is visual: you click through options in the Power Query Editor rather than writing code. Behind the scenes, each action generates a line of M, the query language that runs the transformations. This combination means beginners can clean data without coding knowledge, while more advanced users can drop into the M code for tasks the interface does not cover directly.

Connecting to data sources

Power Query supports dozens of connectors out of the box: Excel workbooks, CSV files, SQL Server and other databases, SharePoint lists, web pages, and REST APIs among them. Once connected, you choose which tables or files to load and can combine data from several sources in a single query, for example joining a sales export with a product list stored in SharePoint. This flexibility is one reason Power Query fits so many reporting scenarios, since real-world data rarely lives in a single clean source.

Common transformations

Typical steps performed in Power Query include removing or renaming columns, filtering out irrelevant rows, splitting a column by a delimiter, changing data types, unpivoting wide tables into a long format better suited for analysis, and merging or appending queries together. Each step is added to the “Applied Steps” list on the right of the editor, which means you can go back, edit, or remove a step at any point without starting over. This step list is also what makes Power Query auditable: anyone can see exactly what happened to the data between source and report.

Query folding and performance

When Power Query connects to a source that supports it, such as a SQL database, it can push transformations back to that source instead of pulling all raw data into memory first. This is called query folding, and it can dramatically speed up refreshes because filtering happens at the database level rather than after import. Not every transformation folds; adding a custom column with complex logic, for example, often breaks folding. Understanding which steps fold and ordering transformations accordingly is a practical skill for anyone building large Power BI models. Once data is cleaned in Power Query, it moves into the semantic model, where relationships and DAX measures take over.

Power Query beyond Power BI

Power Query is not exclusive to Power BI. Excel’s “Get & Transform Data” feature is the same engine, and Power Automate uses it too for certain data operations. This shared foundation means a transformation skill learned in one Microsoft product carries over directly to the others, which is useful for teams that work across both Excel and Power BI reporting.

Our tip: Do as much filtering and column removal as early as possible in your query steps. Trimming unused data before later transformations keeps refreshes faster and makes the query easier to follow for anyone who opens it after you.

Frequently asked questions

Is Power Query the same as Power BI?

No. Power Query is a component within Power BI, not Power BI itself. Power BI Desktop uses Power Query as its data preparation layer: the Power Query Editor is where you shape data before it gets loaded into the semantic model. Power Query also exists independently in Excel (Get & Transform Data) and Power Automate, which is why skills learned in one tool transfer to the others.

What is the M language in Power Query?

M is the functional programming language that powers Power Query behind the scenes. Every transformation you apply through the visual interface, such as removing a column or filtering rows, is translated into an M formula automatically. You rarely need to write M by hand for standard tasks, but understanding it helps for advanced transformations, custom functions, or troubleshooting a query that behaves unexpectedly. You can view and edit the M code directly through the Advanced Editor.

Can Power Query connect to any data source?

Power Query supports a wide range of connectors, including Excel and CSV files, SQL Server and other databases, SharePoint lists, web pages, REST APIs, and cloud services such as Salesforce or Dynamics 365. If a native connector does not exist for a specific system, you can often still connect via a generic web or ODBC connector, or through an intermediate export such as a CSV file.

Does Power Query slow down my Power BI report?

Power Query transformations run at refresh time, not when someone opens the report, so they do not directly affect report loading speed for viewers. However, inefficient queries, such as unnecessary steps or transformations applied after a large join, can make refreshes take much longer. Folding transformations back to the data source where possible, and removing unused columns and rows early, keeps refresh times manageable.

Want a dashboard or automation built for you?

Stuurboard BI builds custom Power BI dashboards and workflow automations. Pragmatic, fast, and without the fuss.