Ian Klosowicz

Power Query is a data connection and transformation tool built into Excel and Power BI. It lets you connect to a data source, shape the data into the format you need, and load it into your workbook or model -- without touching the source data and without writing manual formulas for every transformation step.
If you've ever spent time cleaning a spreadsheet by hand -- fixing date formats, removing blank rows, splitting a column into two, merging data from multiple files -- Power Query automates that process. You set it up once, and every time you refresh, the same steps run automatically.
The problem Power Query solves is the gap between how data arrives and how data needs to look for analysis.
Data from source systems -- exported CSVs, database dumps, system reports -- rarely comes in the format you need. Dates are formatted inconsistently. There are extra header rows. Columns have names that don't match what your analysis expects. Some fields contain multiple pieces of information that should be split. Tables that need to be combined are in separate files.
Without Power Query, the standard approach is to clean the data manually every time it comes in. Copy it to a working sheet, delete the rows you don't need, fix the formatting, merge the sheets together. This works once. It becomes expensive when the data updates weekly or monthly and you have to repeat the same steps each time.
Power Query records the transformation steps. When data comes in again, you click Refresh and the same steps run on the new data.
Power Query works in a few stages:
Connect. You point Power Query at a data source -- a file, a folder of files, a database, a web URL, an API. Power Query reads the data and shows you a preview.
Transform. You apply transformation steps using the Query Editor interface. Most common operations are available as menu commands: remove columns, filter rows, change data types, split columns, merge queries. Each step you apply is recorded in the Applied Steps pane on the right side of the editor.
Load. Once the data is shaped the way you want it, you load it into Excel (as a table on a worksheet or directly into the Data Model) or into Power BI's data model.
Refresh. When the source data changes, clicking Refresh re-runs all the transformation steps against the new data and updates the output.
The tasks Power Query handles most often in practice:
Power Query is the right tool when:
Power Query is not the right tool when:
In Excel: Data tab, Get Data button. This opens the connection options. For a simple start, connect to an Excel file or CSV.
In Power BI: Home tab, Get Data button. The available source types are broader than Excel's, including databases, cloud services, and web URLs.
Once you have data in the editor, the ribbon at the top of the Query Editor contains the most common transformation operations. Right-clicking a column header shows options specific to that column. The Applied Steps pane on the right shows the sequence of steps and lets you click back to any previous state.
The best way to learn Power Query is to import a messy dataset you actually need to clean and work through the transformations on that data. Tutorial datasets built for learning are more sanitized than real data and don't surface the kinds of problems Power Query is most useful for.
Does Power Query change the source data?
No. Power Query reads from the source and creates a separate output in your workbook or model. The original file is not modified.
What's the difference between Power Query in Excel and in Power BI?
They use the same underlying engine and the same M language. The interface is nearly identical. The main difference is where the output goes: in Excel, it loads to a worksheet table or the Data Model; in Power BI, it loads to the model. Queries built in Excel can often be copied directly into Power BI and vice versa.
Do I need to know the M language?
Not to start. Most operations are available through the interface without writing M. But understanding the basics of M becomes useful when you need to do something the interface doesn't directly support, or when you want to parameterize a query (like making the date range a variable rather than a hardcoded value).
How do I handle a source file that changes location?
In the Applied Steps pane, click the gear icon next to the Source step. You can update the file path there. For queries that need to work across different machines or environments, using a parameter for the file path is the more robust approach.