Psst... there are a few Easter eggs hidden around this site. Can you find them?

The Blue Star Academy

Power Query in Plain English: A Guide for Excel Reporters

Power Query in Plain English: A Guide for Excel Reporters, with The Blue Star Academy logo

If you build reports in Excel, Power Query is a tool worth knowing about. It is built into Excel, and it gets your data in and tidies it up before you report on it. You set the steps once, and Excel repeats them next time.

I'll be honest, the name sounds like something that lives in a server room. It doesn't. This is a plain English guide for anyone who has ever sighed at a messy export on the last working day of the month.

What is Power Query in Excel?

Power Query is a feature in Excel for importing data and cleaning it up before it lands in your report. Think of it as a set of recorded instructions. You tell Excel what to do once, and it remembers every step.

So instead of deleting the same columns and fixing the same dates by hand every month, you let Excel do it for you.

You do not need to be a coder or an IT person. Most of it is done by clicking buttons and choosing options from menus. If you can use filters and tidy a spreadsheet, you can make a start (I promise it's less scary than it sounds).

Why use Power Query instead of copying and pasting?

You know the routine. A new export arrives. You paste it in, delete the columns you never use, fix the dates that have decided to be text, sort out the odd formatting, and then double check it all looks right.

Then next month you do the whole thing again... and try to remember what you did last time.

Power Query repeats those same steps for you. That means your report is less likely to be thrown off by a missed step or a slip of the mouse. It does the same thing every time, which is more than I can say for me on a Friday afternoon.

To keep it honest, it takes a little time to set up. But for jobs you repeat, that time comes back quickly.

What can Power Query actually do?

Quite a lot, as it turns out. Some of the most common tasks are:

  • Removing blank rows
  • Splitting one column into two (a full name into first name and surname, for example)
  • Changing data types, so numbers act like numbers and dates act like dates
  • Fixing dates that have come in looking odd
  • Removing duplicates
  • Tidying messy text, such as stray spaces or inconsistent capital letters

It can also combine several files or sheets into one table. If you get a separate sheet or file for each month or team, that is a big help.

And it is not limited to the workbook you are in. You can bring in data from other Excel workbooks, CSV files and whole folders of files.

How do you open Power Query in Excel?

You will find it on the Data tab. Depending on your version of Excel, look for options such as Get Data or From Table/Range. The exact button names can vary a little between versions, so don't panic if yours looks slightly different.

Here is a simple first step:

  1. Click anywhere in a table of data in your sheet.
  2. Go to the Data tab and choose From Table/Range.
  3. Confirm the range if Excel asks.
  4. Have a look at the window that opens. This is the Power Query Editor.

The editor looks a bit different to the Excel grid you know, but your data is right there in the middle.

On the right you will see a list called Applied Steps. This is the recipe of everything you have done to the data. You can click on any step to see how the data looked at that point, and you can delete a step if you change your mind. It's a rather forgiving bit of kit.

A simple Power Query example for monthly reports

Let's use a made-up example. Imagine you get a monthly sales or activity export. It always arrives with a couple of columns you don't need, dates stored as text and a few blank rows.

Here is how Power Query could handle it:

  1. Load the data into Power Query using From Table/Range or by importing the file.
  2. Clean it up. Remove the columns you don't need, delete blank rows and set the date column to a date data type.
  3. Load the result to a sheet in your workbook, ready for your report.
  4. Next month, paste or save the new export in the same place and click Refresh.

That Refresh button is the satisfying bit. Instead of starting again, Excel runs through all your saved steps and gives you a tidy table in a few moments. After years of doing it by hand, it feels slightly like cheating... (it isn't, it's just working smarter).

Power Query mistakes and tips for beginners

A few tips to help you get going:

  • Start with one small, annoying task. Pick the job you groan about most, rather than trying to automate your whole reporting process.
  • Give your steps sensible names. "Removed blank rows" will mean much more to you in three months than a default label.
  • Keep your original data untouched. Power Query reads from your source without changing it, so keep a copy of the raw export somewhere safe.

One thing to know is that if a new export arrives with changed column names or a different layout, a refresh can throw up an error. Don't worry. This is fixable, usually by checking the step that refers to the column that has changed. I've seen a fair few error messages in my time, and I'm still here to tell the tale.

Also, check your results after a refresh rather than trusting them blindly. A quick look at the totals, the number of rows and a few sample entries will tell you if something has gone astray.

Key takeaways on Power Query

  • Power Query is a tool built into Excel that brings in data and tidies it up before you report on it.
  • It works like recorded instructions: set the steps once, then refresh next time.
  • It helps anyone who reports in Excel, not just data specialists.
  • It can remove blanks, split columns, fix dates, remove duplicates and combine files.
  • Start with one small, repetitive job, name your steps, keep your original data safe and check your results after a refresh.

If you do your reporting in Excel, Power Query is well worth a play. Start small and see how you get on.

Visit my website for details

www.thebluestaracademy.co.uk

Or email me: rachel@thebluestaracademy.co.uk

More from the blog

Think I can help? Contact me today

Tell me what your team needs and I will come back to you.