Power Query in Excel is a free, built-in data transformation tool that lets you import, clean and reshape data from almost any source without writing a single formula. It ships with Excel 2016 and later, records every cleaning step automatically and replays them on refresh — turning hours of manual work into seconds.
- Power Query is free and built into Excel 2016, 2019, 2021 and Microsoft 365 on Windows.
- Every step is recorded in a reusable query, so you never redo the same cleaning manually.
- You can merge and append multiple files or tables without VLOOKUP or complex array formulas.
- Unpivot converts wide, crosstab-style sheets into long, analysis-friendly tables in two clicks.
- Refresh updates all your cleaned data in seconds when the source file changes.
What Power Query in Excel Does
Power Query in Excel sits under the Data tab as the Get & Transform group. When you click “Get Data,” you choose a source — a local CSV, an Excel workbook, a SQL database, a SharePoint list or even a website table. Excel opens the Query Editor, a dedicated interface where you apply transformations step by step.
Each transformation you apply — removing a column, changing a data type, filtering blank rows — gets listed in the Applied Steps pane on the right. That list is your repeatable workflow. Close and load the query, and Excel writes a clean table to your sheet. Next week, when your source file updates, you hit Refresh and every step runs again in the same order.
How to Use Power Query in Excel vs Formulas
Formulas are great for calculations on already-clean data. Power Query wins when the data itself is messy, inconsistent or spread across multiple files. A VLOOKUP breaks if a column moves. A Power Query merge step does not care, because it references column names, not cell addresses.
On the job, analysts who rely only on formulas often spend 60 to 70 percent of their time just cleaning data, according to a 2023 State of Data Science survey by Anaconda. Power Query cuts that dramatically by making cleaning a one-time setup. If you are building skills to work as a data analyst or data scientist, Power Query is one of the first tools worth mastering because it handles the messy, repetitive work that fills most analysts’ mornings.
The M Language Behind the Scenes
Every step you click generates code in M language, Power Query’s native formula language. You do not need to write M to use Power Query, but knowing it helps when you want to do something the GUI does not expose directly, like a conditional column with multiple logic branches. You can view and edit the M code at any time using the Advanced Editor.
M is a functional language, meaning each expression produces a value rather than modifying state. A simple step that filters a column called “Region” to show only “Maharashtra” looks like this in M: Table.SelectRows(Source, each [Region] = “Maharashtra”). Readable, auditable and easy to hand off to a colleague.
Importing and Cleaning Data: Excel ETL Without Code
One of the most common use cases across Indian offices is pulling monthly sales reports exported from an ERP system like SAP or Tally as CSV files. Each file typically has inconsistent headers, blank rows at the top and a “Total” row at the bottom that breaks calculations. Indian SMEs filing GST reconciliation reports face the same problem every month: multiple CSV exports from different portals that need to be combined and cleaned before any analysis is possible. Power Query handles all of this in a single query.
Power Query Excel Tutorial: Cleaning a CSV Import Step by Step
- Go to Data > Get Data > From File > From Text/CSV and select your file.
- In the preview, click Transform Data to open the Query Editor.
- Select Use First Row as Headers if Excel did not detect them automatically.
- Select any column, right-click and choose Remove Errors or Replace Values to fix nulls.
- Filter out the “Total” row by clicking the column dropdown and deselecting it.
- Set the correct data type for each column — date, number or text — using the type icon at the column header.
- Click Close & Load to write the clean table to your worksheet.
One mistake beginners make constantly: they change data types before removing blank rows. That causes errors because Excel tries to convert an empty cell to a number and fails. Always remove nulls and filter rows first, then set types. It is a small habit that saves a lot of frustration.
Connecting to Multiple Source Types
| Source Type | Get Data Path | Common Use Case |
|---|---|---|
| Excel Workbook | From File > From Workbook | Consolidating monthly reports |
| CSV / Text | From File > From Text/CSV | ERP exports, GST reconciliation, bank statements |
| SQL Server / MySQL | From Database | Live transactional data |
| SharePoint / OneDrive Folder | From Online Services | Team-shared data files |
| Web Table | From Other Sources > From Web | Public datasets, stock data |
| From File > From PDF | Extracting tables from MIS and invoice reports |
Microsoft’s official documentation confirms all these connectors are available in Excel for Microsoft 365 on Windows. The PDF connector alone saves hours for finance teams who receive invoices and MIS reports as PDFs every month — a near-universal pain point for Indian finance and operations teams working with Tally-generated PDFs.
Merging, Appending and Unpivoting in Power Query
This is where Power Query separates itself from anything you can do with formulas alone. Merge, append and unpivot are three operations that most Excel users have never had access to without writing complex array logic or using VBA.
Power Query Merge Tables: The Alternative to VLOOKUP
Merge combines two queries based on a matching column, exactly like a SQL JOIN. You pick the left table (say, your sales data), the right table (your product master) and the column that links them (Product ID). You then choose the join type: Left Outer, Inner, Full Outer and so on.
The result is a new column containing the matched rows from the right table. You expand it to pull through whichever fields you need. No VLOOKUP, no INDEX-MATCH, no formula dragging. And when either source updates, the merge re-runs on refresh. This is the kind of workflow that data engineers build at scale in Python or SQL, but Power Query makes a simpler version accessible to any analyst.
Append: Stacking Multiple Files Automatically
Append stacks two or more queries on top of each other, combining rows from tables that share the same structure. The classic use case is twelve monthly sales CSVs that need to become one annual dataset. Instead of copying and pasting twelve sheets, you point Power Query at a folder and it appends every file inside it automatically.
NASSCOM’s 2024 India Data and AI Report found that data consolidation and preparation remain the top time-consuming tasks for Indian analytics teams, with over 55 percent of respondents citing it as their primary bottleneck. Append queries in Power Query directly address that problem at the individual analyst level, without needing a data engineering pipeline.
Unpivot: Reshaping Crosstab Data for Self-Service BI
Unpivot is the transformation most people have never heard of until they need it badly. Crosstab tables, where months are column headers and products are rows, look great for reading but are useless for pivot tables or charting. Unpivot converts them into a three-column structure: attribute, value and entity.
Select the columns you want to unpivot, right-click and choose “Unpivot Columns.” Done. A table that was 12 columns wide becomes a clean two-column key-value pair that works with any chart, pivot table or Power BI or Tableau dashboard instantly.
Refreshing Repeatable Workflows
The real payoff of Power Query in Excel is the refresh step. Once your query is built, you update the source file and press Refresh All under the Data tab. Every import, every clean step, every merge and every unpivot runs again in sequence. What took three hours manually now takes three seconds.
You can also schedule automatic refresh if your workbook is published to SharePoint or OneDrive, meaning your team always sees current data without anyone manually running the process. According to LinkedIn’s 2024 Jobs on the Rise India report, data analysis roles grew by 46 percent year-on-year, with repeatable, automated data workflows listed as a core competency employers screen for at interview stage.
Practical Tip: Document Your Queries
Rename every Applied Step to something meaningful — “Remove blank rows” instead of “Filtered Rows1.” Double-click the step name in the Applied Steps pane to rename it. When a colleague picks up your file six months later, they will understand the logic without needing to ask you. This is standard practice in professional analytics teams and something most self-taught Power Query users skip entirely.
When to Move Beyond Power Query
Power Query handles most cleaning and transformation needs at the individual or small-team level. When your data exceeds a few million rows, or when you need to automate workflows that run on a server without a human opening Excel, you are looking at Python for automation and API-based data pipelines. Tools like Pandas and NumPy do much of what Power Query does, but programmatically and at scale. Power Query is the right starting point. Python is where you go when the job outgrows it.
If you are building a portfolio, combining Power Query skills with actual data analytics projects is what gets you interviews. Employers want to see that you can take raw, messy data and produce something a manager can act on, not just that you know the tool exists.
Frequently Asked Questions
What is Power Query in Excel?
Power Query in Excel is a built-in data transformation tool found under the Data tab in the Get and Transform group. It lets you import data from dozens of sources, clean it visually and save every step as a repeatable workflow. You do not need formulas or VBA to use it.
Is Power Query free?
Yes, Power Query is completely free. It is built into Excel 2016, Excel 2019, Excel 2021 and all Microsoft 365 subscriptions on Windows at no extra cost. There is no add-in to buy or install separately for those versions.
Power Query vs formulas: which is better for data cleaning?
Power Query is better for importing, cleaning and reshaping messy or multi-source data. Formulas are better for calculations on data that is already clean and structured. Most professional analysts use both: Power Query to prepare the data, formulas or pivot tables to analyse it.
Can Power Query merge tables in Excel?
Yes. Power Query can merge two tables on a matching column (like a SQL JOIN) or append multiple files from a folder into one combined table. Both operations update automatically on refresh, making it far more reliable than VLOOKUP or manual copy-paste for recurring reports.
Does Power Query work in Excel for Mac?
Partially. As of 2024, Excel for Mac supports a limited set of Power Query features through Microsoft 365. Some connectors and advanced transformations available on Windows are not yet available on Mac. For full Power Query functionality, Windows Excel or Excel Online is recommended.
How do I use Power Query to combine multiple Excel files?
Go to Data > Get Data > From File > From Folder, select the folder containing your files and choose Combine and Transform. Power Query loads every file in the folder, appends them into one table and refreshes automatically whenever you add a new file to the folder.
Power Query in Excel turns one-off data cleaning into a system you run once and reuse forever. If you work with reports, exports or any structured data, it is the single highest-leverage Excel skill you can build this month. Here are three things you can do this week to get started:
- Open Excel, go to Data > Get Data > From File > From Text/CSV and import any CSV you have. Apply three transformations and load it to a sheet.
- Try the Append workflow: save two copies of the same CSV with different data, point Power Query at the folder and watch it combine them automatically.
- Explore real data analytics projects to practise these skills on datasets that mirror what employers actually use.
Browse the full catalogue of 3.0 University online certification courses in Cybersecurity, AI, Ethical Hacking and Blockchain to find where your data skills can take you next, or explore the EC-Council Certified SOC Analyst course if applied, high-stakes data work in security operations interests you.
Last updated: June 2025. Reviewed by the 3University editorial team.