A Complete Guide to Power Query in Excel
TL;DR: Have you spent more time on copy-pasting, filtering, and reformatting the same messy spreadsheet every week? Power Query was built to solve this. This guide covers what Power Query in Excel is, how to enable and use it, and the intermediate-to-advanced techniques- merging, appending, and custom columns- that turn it from a nice-to-have into your most-used Excel tool.

What Is Power Query?

Power Query is a data transformation and preparation tool built into Excel that lets you extract, transform, and load (ETL) data from almost any source- spreadsheets, databases, web pages, APIs- into a clean, ready-to-use table. Instead of manually cleaning data every time it changes, you build the cleaning steps once, and Power Query replays them automatically on every refresh.

It's built into Excel 2016 and later, and available in Excel for Microsoft 365. On older versions, it's a free add-in you can install separately.

Power Query

The Four Phases of Power Query

Every Power Query workflow follows the same basic ETL structure:

  1. Connect: Link to your data source (a file, a database, a web page, or an API).
  2. Transform: Clean and reshape the data, remove duplicates, fix errors, split or merge columns, filter rows.
  3. Combine: Bring together data from multiple sources or tables into one unified table.
  4. Load: Send the finished result into your worksheet or Excel's data model for further analysis.

How to Enable Power Query in Excel

If Power Query isn't visible in your ribbon:

  1. Go to File → Options → Add-ins.
  2. At the bottom, select COM Add-ins from the dropdown, then click Go.
  3. Check the box for Microsoft Power Query for Excel, then click OK.

In modern Excel (365 and 2016+), Power Query usually appears automatically under the Data tab as Get & Transform Data, so you don't need to activate it separately.

With Our Trending Data Analyst CourseExplore Program
Want to Become a Data Analyst? Learn From Experts!

Getting Started: A Basic Power Query Example

  1. Go to Data → Get Data → From File → From Workbook (or From Table/Range if your data's already in Excel).
  2. Select your source; Power Query opens the Query Editor with a preview of your data.
  3. Apply transformations: remove a column, filter rows, rename headers, whatever your data needs.
  4. Click Close & Load to send the cleaned data into your worksheet.
  5. When your source data updates, click Refresh and every transformation step reruns automatically.

That last step is the entire point of Power Query: you're not cleaning data once, you're building a repeatable process.

Advanced Power Query Techniques

Once you're comfortable with the basics, these techniques are where Power Query really starts saving serious time.

Merging Queries

Merging combines two queries side-by-side based on a matching column, similar to a VLOOKUP or a SQL join, but far more flexible. Go to Home → Merge Queries, select your two tables and the matching column, then choose a join type (Inner, Left Outer, Right Outer, Full Outer) depending on whether you want only matching rows or everything from one or both tables.

Appending Queries

Appending stacks two or more queries on top of each other, combining rows rather than columns, useful for combining monthly reports into one yearly table, for example. Go to Home → Append Queries, choose "Two Tables" or "Three or More Tables," and Power Query aligns matching column names automatically.

Custom Columns and the M Language

Every action you take in Power Query's interface is actually being written as code behind the scenes, in a language called M. For calculations the built-in UI doesn't cover, go to Add Column → Custom Column and write a simple M formula, for example:

= [Revenue] - [Cost]

You don't need to learn M deeply to use Power Query well, but knowing it exists (and that you can view and edit it via the Advanced Editor) unlocks transformations the point-and-click interface alone can't handle.

Common Power Query Functions

A few functions come up constantly once you move past basic cleanup: Text.Trim and Text.Clean for removing stray spaces and hidden characters, Table.RemoveColumns for dropping unneeded fields, List.Sum or List.Average for quick aggregations inside a custom column, and Table.Group for building summary tables directly within Power Query instead of a separate pivot table.

Expand your analysis beyond Power Query with Simplilearn’s AI-Powered Business Analyst Course. Build practical experience with Excel, SQL, Power BI, GenAI, and business analysis frameworks used to solve real-world business problems. 

Power Query vs. Power Pivot: What's the Difference?

People often confuse them because they work together, but they solve different problems. Power Query focuses on getting and cleaning data: connecting to sources, transforming it, and combining tables before it reaches your worksheet. Power Pivot focuses on analyzing data once it's loaded: building relationships between tables and writing DAX formulas for calculations, similar to advanced pivot tables. In practice, a common workflow uses Power Query to prepare clean data, then Power Pivot to model and analyze it.

Why Power Query Matters

Power Query removes the most repetitive, error-prone part of working with data: manual cleanup. A lot of time in any data-heavy job goes to cutting, pasting, and reformatting, tasks Power Query automates and makes repeatable. It also handles data at a scale manual methods can't: combining dozens of files, connecting to live APIs, or reshaping tables with thousands of rows in seconds rather than hours.

With Our Program In Collaboration With MicrosoftExplore Course
Become an Business Analysis Expert

Conclusion

Power Query turns Excel from a tool you clean data in manually into one that cleans data for you, automatically, every time it changes. Start with the basics: connect to a source, apply a few transformations, and load the result; then build toward merging, appending, and custom columns once you're comfortable. That progression from basic cleanup to advanced automation is what separates casual Excel users from the people who build the reports everyone else relies on.

Simplilearn's free Power Query in Excel course covers this full path, from fundamentals to advanced techniques, and includes a certificate upon completion.

FAQs

1. What is Power Query used for?

Power Query is used to connect to, clean, and combine data from multiple sources, spreadsheets, databases, files, and APIs, into a single, ready-to-analyze table inside Excel, with the entire process repeatable on refresh.

2. Is Power Query free?

Yes. It's built into Excel 2016 and later and included with Excel for Microsoft 365. On older versions, it's available as a free downloadable add-in.

3. What is the difference between merge and append in Power Query?

Merge combines two queries side by side based on a matching column, similar to a lookup or join. Append stacks queries on top of each other, combining rows from tables with matching columns, like combining monthly reports into one table.

4. Do I need to learn the M language to use Power Query?

Not for most everyday tasks; the point-and-click interface covers common transformations. Learning basic M becomes useful once you need custom calculations or transformations the interface doesn't directly support.

5. What is the difference between Power Query and Power Pivot?

Power Query prepares and cleans data before it's loaded. Power Pivot analyzes data after it's loaded, builds relationships between tables, and uses DAX formulas for advanced calculations. You typically use them together: Power Query first, then Power Pivot.

6. How do I refresh data in Power Query?

Click Refresh on the Data tab, or right-click your query in the Queries & Connections pane and select Refresh. Every transformation step you built reapplies automatically to the updated source data.

About the Author

Shruti MShruti M

Shruti is an engineer and a technophile. She works on several trending technologies. Her hobbies include reading, dancing and learning new languages. Currently, she is learning the Japanese language.

View More
  • Acknowledgement
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, OPM3 and the PMI ATP seal are the registered marks of the Project Management Institute, Inc.
  • *All trademarks are the property of their respective owners and their inclusion does not imply endorsement or affiliation.
  • Career Impact Results vary based on experience and numerous factors.