Skip to content

Power Query for Finance: The Skill That Pays Off

Master Power Query to automate data transformation in Excel. Essential skill for modern finance professionals.

Michael Jones8 min read
Power Query for Finance: The Skill That Pays Off

You download data from your ERP. It's messy:

  • Wrong column order
  • Extra header rows
  • Need to merge with another file
  • Calculations needed

You spend 30 minutes cleaning it. Every. Single. Month.

Power Query does this in 30 seconds. And it's already in Excel.

What Is Power Query?

Power Query is Excel's data transformation engine.

Think of it as:

  • ETL tool built into Excel
  • Recording macro for data cleanup
  • Automated data pipeline

Available in:

  • Excel 2016+
  • Excel 365
  • Free
  • Built-in (no add-in needed)

Why Finance Teams Need It

You Import Data Repeatedly

Same report from ERP every month?

  • Download
  • Clean
  • Transform
  • Analyze

Power Query:

  • Click refresh
  • Done

You Combine Multiple Files

Merge:

  • Sales data
  • Budget file
  • Customer list
  • Product master

Manually: 20 VLOOKUPs, hope nothing breaks

Power Query: Define once, refresh anytime

You Clean Messy Data

ERP exports with:

  • Header rows you don't need
  • Columns in wrong order
  • Text that should be numbers
  • Blanks that mess up formulas

Power Query: Automate the cleanup

Real Use Cases

Case 1: Monthly P&L Report

Manual Process:

  1. Download GL detail from NetSuite
  2. Delete top 3 rows
  3. Remove columns F, H, J
  4. Split account column into account code and name
  5. Add month and year columns
  6. Remove rows where amount = 0
  7. Pivot by department

Time: 15 minutes

Power Query Process:

  1. Click refresh

Time: 5 seconds

Case 2: Revenue Report

Manual Process:

  1. Export invoices from Salesforce
  2. Export customer list
  3. VLOOKUP customer segment
  4. Filter out test customers
  5. Group by month
  6. Calculate cumulative

Time: 20 minutes

Power Query Process:

  1. Click refresh

Time: 5 seconds

Case 3: Budget vs Actual

Manual Process:

  1. Get actuals from ERP
  2. Get budget from Excel file
  3. Format both the same way
  4. VLOOKUP or INDEX/MATCH
  5. Calculate variance
  6. Format for presentation

Time: 30 minutes

Power Query Process:

  1. Click refresh
  2. Calculations happen automatically

Time: 5 seconds

Getting Started

Finding Power Query

Excel ribbon:

  • Data tab
  • "Get Data" or "Get & Transform Data" section
  • Or: Data > Queries & Connections

Your First Query

Scenario: Clean monthly sales export

Steps:

  1. Data > From File > From Excel
  2. Select your file
  3. Choose your table/sheet
  4. Click "Transform Data"

Now you're in Power Query Editor.

Transform:

  • Remove top rows: Home > Remove Rows > Remove Top Rows
  • Remove columns: Right-click column > Remove
  • Change data types: Right-click column > Change Type
  • Filter: Click dropdown on column header
  • Rename: Double-click column name

Load:

  • Home > Close & Load
  • Data appears in Excel

Refresh:

  • Right-click table > Refresh
  • Or: Data > Refresh All

Common Transformations

Remove Rows

  • Remove top rows (header junk)
  • Remove bottom rows (footer totals)
  • Remove blanks
  • Remove duplicates
  • Keep only rows where [condition]

Example: Keep only rows where Amount > 0

  • Click dropdown on Amount column
  • Number Filters > Greater Than > 0

Transform Columns

  • Change data type
  • Replace values
  • Split columns
  • Merge columns
  • Extract parts (left, right, middle)
  • Trim whitespace

Example: Split "Account - Name" into two columns

  • Select column
  • Transform > Split Column > By Delimiter
  • Choose delimiter: " - "

Add Columns

  • Custom columns with formulas
  • Conditional columns (IF logic)
  • Index column
  • Date parts (month, year, quarter)

Example: Add month name from date

  • Add Column > Date > Month > Name of Month

Merge Queries

Like VLOOKUP, but better:

  • Merge > Select tables
  • Choose key column from each
  • Select join type
  • Expand columns you want

Example: Add customer name to sales data

  1. Have Sales query and Customer query
  2. In Sales query: Home > Merge Queries
  3. Match on Customer ID
  4. Expand to get Customer Name

Append Queries

Stack data vertically:

  • Combine multiple months
  • Combine multiple files
  • Same structure, different data

Example: Combine Jan, Feb, Mar sales files

  • Home > Append Queries
  • Select all three
  • Creates one combined table

Advanced Techniques

Combine Folder of Files

Scenario: Sales report each month as separate file

Manual: Open each, copy, paste

Power Query:

  1. Data > Get Data > From File > From Folder
  2. Choose folder
  3. Combine files
  4. Done

Next month: Drop new file in folder, click refresh.

Parameters for Dynamic Sources

Scenario: File path changes

Create parameter:

  1. Manage Parameters > New
  2. Name it "FilePath"
  3. Set default value
  4. Use in query

Change source without editing query.

Custom Functions

Scenario: Same transformation on multiple tables

Create function:

  1. Create query with transformation
  2. Right-click > Create Function
  3. Name it
  4. Invoke on other queries

Reuse logic everywhere.

Conditional Logic

Example: Categorize expenses

Add column:

if [Amount] > 1000 then "Large"
else if [Amount] > 100 then "Medium"
else "Small"

M language (Power Query's language) is readable.

Power Query + AI

ChatGPT for M Code

M is Power Query's language.

ChatGPT can write it:

Prompt: "Write Power Query M code to:

  • Filter to rows where Status = 'Approved'
  • Extract year from Date column
  • Group by Year and sum Amount"

You'll get working M code to paste.

Claude for Complex Logic

For harder transformations, Claude (or GPT-4) writes better M code.

Copy, paste into Advanced Editor, adjust.

Common Mistakes

Mistake #1: Changing Source Data Format

Power Query expects consistent structure.

If source file changes format, query breaks.

Fix: Keep source format stable, or adjust query.

Mistake #2: Not Documenting Steps

You'll forget what each step does.

Fix: Rename steps clearly in Applied Steps.

Mistake #3: Loading Too Much Data

Loading 1M rows into Excel = slow.

Fix:

  • Filter in Power Query first
  • Or load to Data Model instead of worksheet

Mistake #4: Hardcoding Values

Hardcoding filters = need to edit query each time.

Fix: Use parameters for dynamic values.

Mistake #5: Not Refreshing

Update source data, forget to refresh query.

Fix: Set up auto-refresh or make it a habit.

Learning Path

Week 1: Basic Imports

  • Import CSV or Excel
  • Remove rows/columns
  • Change data types
  • Load to Excel

Week 2: Transformations

  • Split/merge columns
  • Replace values
  • Add calculated columns
  • Filter and sort

Week 3: Combining Data

  • Append queries (stack)
  • Merge queries (join)
  • Combine multiple files

Week 4: Advanced

  • Parameters
  • Custom columns with M
  • Error handling
  • Performance optimization

Building Your First Real Query

Scenario: Monthly Sales Analysis

You get:

  • Sales export (messy)
  • Need: Clean, with customer segment, grouped by month

Steps:

  1. Import

    • Data > From File > From Excel
    • Select sales file
    • Transform Data
  2. Clean

    • Remove top 2 rows (headers)
    • Remove columns: Notes, Internal ID
    • Rename columns clearly
    • Change Date to Date type
    • Change Amount to Decimal
  3. Add Customer Data

    • Create second query from customer file
    • Back to sales query
    • Merge on Customer ID
    • Expand Segment column
  4. Add Calculations

    • Add column: Month (from Date)
    • Add column: Year (from Date)
  5. Load

    • Close & Load
    • Now you have clean, enriched data

Next month:

  • Drop new sales file in same location
  • Refresh
  • Done

Power Query vs. Other Tools

vs. Excel Formulas:

  • PQ: Cleaner, repeatable, faster
  • Formulas: Good for calculations on clean data

vs. Python/SQL:

  • PQ: Easier, no coding, in Excel
  • Python/SQL: More powerful, for huge data

vs. Alteryx/Tableau Prep:

  • PQ: Free, integrated with Excel
  • Others: More features, cost money

For most finance use cases: Power Query is enough.

The ROI

Time saved per month:

  • 3-5 recurring reports
  • 20 minutes each manually
  • = 60-100 minutes saved

Learning investment:

  • 4-8 hours to get proficient
  • Pays back in 1-2 months

Ongoing benefit:

  • Forever

The Bottom Line

Power Query is the highest-ROI Excel skill to learn.

If you:

  • Import data regularly
  • Clean messy exports
  • Combine multiple sources
  • Do the same transformations monthly

You need Power Query.

It's already in your Excel. Free. Waiting.

Start this month. Your future self will thank you.


Subscribe to The CFO Brief for more Excel and finance automation tips.

Want to put this into practice?

Work with engineers who understand finance to turn the ideas in this article into a reliable workflow for your team.

Talk to a Finance AI Expert
Newsletter

Practical finance insights, by email

New articles on finance operations, CFO leadership and AI adoption — written for people who run finance teams.