Streamlining your tech stack for maximum efficiency

Learn, explore, and grow with our knowledge hub.

Excel Power Query Tutorial for Business Reporting | Smart Statistics
Excel Power Query Tutorial

Turn Spreadsheets into Powerful Insights with Excel Power Query

Many recurring Excel reports involve exactly the same work every week or month: download a file, delete unwanted columns, fix dates, copy formulas, merge another table, filter errors and rebuild the final report.

Power Query changes that process. Instead of manually repeating the preparation, you define the transformation once and let Excel repeat those steps when fresh data arrives.

The result is not simply faster reporting. It is a more consistent data-preparation process that is easier to review, maintain and eventually scale into Power BI or a wider analytics solution.

Connect Import data without repeated copying.
Transform Record repeatable cleaning steps.
Combine Merge tables and append files.
Refresh Repeat the process with new data.
Monthly Reporting Query Illustrative Power Query workspace
Refresh ready
Source Rows 18.4K Illustrative
Queries 6 Illustrative
Transform Steps 14 Illustrative
Refresh 1 Click Illustrative

Queries

Sales Data Primary transaction table
Customer Master Customer attributes
Product Master Product categories
Cleaned Reporting Data Final analytical output

Applied Steps

1 Connect to Source
2 Set Data Types
3 Clean Text Fields
4 Merge Customer Data
5 Load Reporting Table
Power Query principle

Record transformation logic once, then refresh the process instead of rebuilding the spreadsheet every cycle.

All figures shown are illustrative examples.
The Spreadsheet Preparation Problem

Excel Reporting Becomes Fragile When Preparation Depends on Memory

If producing the report requires somebody to remember exactly which columns to delete, which filters to apply and which formulas to copy, the process is carrying unnecessary operational risk.

Copy and Paste

New exports are manually copied into reporting workbooks, creating opportunities for missing rows, wrong ranges and accidental overwrites.

Repeated Cleaning

The same spaces, inconsistent categories, unwanted columns and date problems are corrected manually every reporting cycle.

Manual Combining

Monthly files, site reports or departmental extracts are copied into one master sheet before analysis can begin.

Slow Refreshes

The business waits for somebody to rebuild the file before management can see current performance.

The Power Query Workflow

Turn Manual Preparation into a Repeatable Data Pipeline

Power Query records each transformation in sequence, allowing the same logic to be applied again when the underlying data changes.

Get Data

Connect to Excel, CSV, folders, databases or other supported sources.

Explore

Review structure, field types, errors and missing values.

Transform

Clean, rename, filter and reshape the source data.

Combine

Merge related tables or append repeated files.

Load

Send clean data to Excel, the Data Model or another analytical destination.

Refresh

Run the recorded process again when new source data arrives.

Step-by-Step Tutorial

Build Your First Repeatable Power Query Reporting Process

Step 1: Connect to the Source Instead of Copying It

Open Excel and go to the Data tab. Use Get Data to connect to the original source wherever possible.

Common business sources include:

  • Excel workbooks
  • CSV and text files
  • Folders containing repeated files
  • SQL databases
  • SharePoint-hosted files
  • Web-based structured data
Connect to the earliest reliable source you can access. Avoid building a Power Query process on top of another manually prepared spreadsheet if the original data is available.

Step 2: Inspect the Data Before Transforming It

Before making changes, understand the structure. Check whether each column means what you expect and whether the data type is appropriate.

Review:

  • Column names
  • Text, number and date types
  • Blank values
  • Error values
  • Unexpected categories
  • Duplicate keys
Do not automatically remove every unusual record. First decide whether the record is genuinely invalid or whether it represents a legitimate business exception.

Step 3: Clean the Data with Recorded Steps

Use the Power Query Editor to turn manual cleaning into a documented sequence of transformations.

Typical steps include:

  • Remove unnecessary columns
  • Rename fields consistently
  • Trim spaces from text
  • Standardise upper or lower case where appropriate
  • Replace known inconsistent values
  • Filter invalid or irrelevant records
  • Set correct data types

A simple M example might look like this:

let
    Source =
        Excel.CurrentWorkbook()
            {[Name="tblSales"]}[Content],

    ChangedTypes =
        Table.TransformColumnTypes(
            Source,
            {
                {"OrderDate", type date},
                {"CustomerID", type text},
                {"SalesValue", type number}
            }
        ),

    TrimmedCustomer =
        Table.TransformColumns(
            ChangedTypes,
            {
                {
                    "CustomerID",
                    Text.Trim,
                    type text
                }
            }
        ),

    ValidSales =
        Table.SelectRows(
            TrimmedCustomer,
            each [SalesValue] <> null
        )
in
    ValidSales
You do not need to write M code for most common tasks. The Power Query interface generates the underlying code as you apply transformations.

Step 4: Merge Lookup Data Instead of Using Repeated VLOOKUPs

Suppose your sales file contains a Customer ID but the customer region and account manager live in a separate table.

Use Merge Queries to join the two datasets.

Sales Data
CustomerID | OrderDate | SalesValue

Customer Master
CustomerID | CustomerName | Region | AccountManager

Merge using:
Sales[CustomerID]
=
CustomerMaster[CustomerID]

You can then expand only the fields needed for reporting.

Before merging, verify that the lookup key is genuinely unique in the lookup table. Unexpected duplicates can multiply rows and distort totals.

Step 5: Combine Monthly Files Automatically

One of the most useful Power Query patterns is importing every compatible file from a folder.

Imagine a folder containing:

Sales_2026_01.xlsx
Sales_2026_02.xlsx
Sales_2026_03.xlsx
Sales_2026_04.xlsx

Connect to the folder rather than importing each workbook separately.

When next month's file arrives:

  • Place it in the same controlled folder
  • Keep the expected structure consistent
  • Refresh the query
  • Allow Power Query to combine it with the existing data
This pattern is particularly useful for site-level, monthly, weekly or departmental files that follow a consistent template.

Step 6: Add Business-Ready Fields Carefully

Some transformations belong naturally in the preparation layer. For example, you may want to create a clean reporting category from a source field.

Examples include:

  • Standardised customer groups
  • Clean product categories
  • Reporting status flags
  • Valid / invalid record indicators
  • Year-month helper columns
Example logic:

If Status = "C"
then "Closed"

else if Status = "O"
then "Open"

else
"Unknown"
Keep important business measures such as margin percentage, year-to-date calculations and other analytical measures in the appropriate reporting or semantic layer when that provides better reuse and consistency.

Step 7: Refresh Instead of Rebuilding

Once the query has been tested, load the result into the destination required by the reporting process.

That could be:

  • An Excel table
  • A PivotTable
  • The Excel Data Model
  • A staging workbook
  • A downstream Power BI process

On the next reporting cycle, update the source and refresh. Power Query repeats the recorded transformation sequence.

That is the key behavioural change: the team stops asking “How do I rebuild this report?” and starts asking “Has the source been updated and has the query refreshed successfully?”
Interactive Power Query Check

Is Your Spreadsheet Process a Good Power Query Candidate?

Select the statements that describe your current process. The score is an illustrative diagnostic, not a formal assessment.

Current Reporting Process

Power Query is particularly useful when structured preparation work repeats on a predictable basis.

Illustrative Power Query Fit

The score below is based only on the statements selected.

0%
Start the assessment

Select the characteristics that apply to your reporting process.

Illustrative diagnostic only.
Build It to Last

Four Rules for Maintainable Power Query Solutions

A query that works today is useful. A query another person can understand and support next year is significantly more valuable.

Name Queries Clearly

Use names such as Sales_Raw, Customer_Lookup and Sales_Clean rather than Query1, Query2 and Query3.

Keep Steps Purposeful

Avoid dozens of unnecessary transformations when a clearer sequence can produce the same result.

Validate Totals

Reconcile row counts and key totals against the source before replacing the existing reporting process.

Control the Source

A well-designed query cannot compensate for uncontrolled file structures, unexpected schema changes or unclear ownership.

Frequently Asked Questions

Excel Power Query FAQs

What is Excel Power Query?
Power Query is a data connection and transformation capability in Excel that lets users import, clean, reshape and combine data through a repeatable sequence of steps.
Can Power Query combine multiple Excel or CSV files?
Yes. Power Query can combine compatible files from a folder, which is particularly useful for monthly, weekly, departmental or site-based reporting processes.
Do I need to know programming to use Power Query?
No. Many common transformations can be created through the Power Query interface. More advanced users can work directly with the underlying M language when required.
Is Power Query better than formulas?
They solve different problems. Power Query is particularly useful for importing, cleaning and reshaping data before analysis, while Excel formulas remain useful for worksheet calculations and interactive modelling.
Can Power Query replace VLOOKUP or XLOOKUP?
In recurring data-preparation processes, Merge Queries can often replace repeated lookup formulas by joining related tables before the data is loaded into the workbook.
Can Power Query feed Power BI?
Power Query concepts are also central to Power BI data preparation. A well-designed Excel Power Query process can therefore provide useful experience when a reporting solution later moves into Power BI.
When should we stop using Excel as the reporting platform?
Consider a more scalable solution when reporting requires broader secure distribution, higher data volumes, centralised KPIs, multiple interactive audiences or a more governed enterprise data model.
How can Smart Statistics help?
Smart Statistics helps UK businesses redesign Excel reporting, automate recurring data preparation and build scalable analytics solutions using Excel, Power Query, Power BI and the wider Microsoft data platform.

If You Clean the Same Spreadsheet Every Month, You Probably Do Not Have a Spreadsheet Problem. You Have a Repeatability Problem.

Power Query lets you turn those repeated preparation steps into a process that can be reviewed, refreshed and improved instead of manually rebuilt every reporting cycle.

Smart Statistics helps UK businesses improve Excel reporting, automate data preparation and create a practical path towards more scalable Power BI and analytics solutions.