0:00 Introduction to Data Cleaning Fundamentals
2:30 Getting Started with Power Query Interface
4:36 Core Data Cleaning Techniques
7:23 Advanced Transformations and Data Standardization
10:49 Finalizing and Loading Clean Data
12:57 Building Repeatable Workflows for Future Analysis
This video provides a comprehensive introduction to data cleaning using Power Query in Excel. It emphasizes that while automation is powerful, a foundation in basic data cleaning functions is essential. The tutorial demonstrates how to transform a messy financial dataset into a clean, analysis-ready format through a repeatable workflow that eliminates the need for manual repetition.
What if I told you you could clean your data once and never have to repeat the same data cleaning process again?
That sounds too good to be true, right? Well, that's exactly what we're going to be doing in today's session
Now before we move into anything, let's talk about the importance of data cleaning
Data cleaning is one of the most important stages of the data
Analysis process and this is because it ensures the accuracy and reliability of your analysis
If your data is not clean, then your analysis will not be reliable either
In fact, many beginners don't realize that data analysts spend more time cleaning data
Than building dashboards than building models or generating insights
Last year, I hosted a live session on data cleaning and since then many of you have asked for a
Practical demonstration using Power Query. And so in this video, that's exactly what we are going to do now
Before we jump into the practical session. Let me quickly talk about why Power Query is such a valuable tool
I remember spending hours cleaning the same reports every single month
Removing duplicates, fixing formatting issues
Splitting columns and repeating the same steps over and over again
And the problem with manual cleaning is that whenever new data arrives
You always have to repeat the entire process all over again, and that's where Power Query comes in
So Power Query is a powerful tool that is built right into Excel
It allows you to clean, it allows you to transform and it also helps you to prepare your data more efficiently
So instead of repeating the same steps
Again, and again every month instead of repeating the same cleaning process every month
Power Query is going to record every transformation that you make
So when a new version of your data sets arrives, you don't have to start all over again or start from scratch
So you simply refresh the query and then the Power Query will help you to automatically apply all your
Cleaning steps and that's one of the reasons why Power Query is an essential tool for data analysts
Now before we continue, I want to emphasize something very very very key
While Power Query is very powerful
I still believe that every aspiring data analyst should learn the fundamentals of data cleaning first
So you should understand functions like trim for removing extra spaces
Proper for formatting text, text to columns for splitting data
Concats for combining values and other essential Excel functions
Why? And this is because Power Query does not solve all problems
Understanding the fundamentals will give you that flexibility that you need
It helps you to know exactly what is happening behind the scenes
And I want you to know that Power Query is just an accelerator. It is not a replacement for foundational knowledge
So it is very very important for you to learn the fundamentals first, learn the foundation of
Data cleaning before you start learning the automation parts, which is Power Query
Now for today's practice, we're going to be working with a messy financial transaction data set
And I will show you step by step how to clean it using Power Query
You can download the data set from the link in the description and follow along with me. So let's get started
The first step is getting data into Power Query
When you open the financial transaction data file
You will see a messy transaction data on the raw transaction sheets. So click anywhere in your data
Now go to the data tab on the Excel ribbon
in the get and transform data section
Click from data or range when you click that
Excel will likely ask you to confirm the range of your data
And just click ok
Excel is going to transform your data
Into an official table and then it opens a brand new window
That is called the Power Query Editor. So this is your new
Dedicated workspace for data transformation
Now the next step is for you to understand the Power Query interface
This is the Power Query
Editor
It might look a little intimidating at first, but let's break it down
at the left pane
This is where your queries are listed. You can have multiple queries in one workbook
At the center pane. This is the data preview
You will see your data here and then you and then it updates in real time as you apply
Your cleaning steps and then at the right step
You would see your applied steps here and this is the most crucial
part
of this query editor
Every single action that you take to clean your data will be recorded here as a step
And this is what makes Power Query very powerful and repeatable
Now to the ribbon
The ribbon is at the top. It has all your transformation tools and I would like you to check each of them
They are organized in a logical way. Now notice that Power Query has already added a few steps automatically
like source and changed type
It tries to guess what your data types are, but we are going to
refine it definitely
Now that we understand the interface, let's clean the transaction data
But one thing I want you to pay attention to throughout this process is the applied steps pane on the right hand side
Every action that we perform is automatically recorded by Power Query
And this is what makes it so powerful. Like I said earlier because once you've cleaned your data, you can simply refresh the
query the next time your new data arrives
So the first action that we need to do is to remove duplicate transactions
The first issue I can see in this data set is duplicate
transaction records
Duplicate transactions can distort your analysis and it can also lead to inaccurate reporting
So it is always good to check for them
I'll select the transaction ID column. I right click on the column header and then I choose remove duplicates
Immediately the Power Query removes the duplicate records and add a new step
Called removed duplicates in the applied steps pane
notice that I didn't have to write a formula or
Manually search for duplicate. Power Query handled it in just a few clicks
Now let's look at the customer name column notice that some names contain extra spaces while others have
inconsistent formatting
These may seem like small issues, but they can create problems during analysis
Especially when grouping or summarizing data and so to fix this I'll select the customer name column
I'll go to the transform tab under the formats. I'll select string
This removes any unnecessary spaces before or after the text now
I'll return to the format and I will choose capitalize each word now all customer names
Follow a consistent format. Take a look at the applied steps pane again Power Query has recorded both
transformations for us automatically
Now let's move to the product category column
You will notice that each value contains two pieces of information separated by an underscore
for example, we might have values like
electronics underscore phones
groceries underscore beverages
Fashion underscore shoes now instead of keeping everything in one column. Let's separate them
So I'll select the product underscore category column
Then I will go to the transform tab
I select split column I choose by delimiter power query automatically
Detects the underscore delimiter and then I'll click. Okay, and just like that
We now have two separate columns
One contains the main category and the other contains the subcategory
And this makes our data much easier to analyze later
So i'll quickly rename the columns to category and subcategory
Now let's examine the status column I can already see some inconsistencies
for example
some records show completes
in the normal form
While others show complete in all
capital letter
or pending in
Lowercase
Even though these values represent the same status
Excel is going to treat them as different values. And so to standardize them
I'll select the status column
Then go to the transform and choose replace values
I'll replace complete in capital letters with complete in the normal format
Then I'll repeat the same process and replace pending
Now every transaction status follows the same naming convention
Consistency like this is extremely important when building reports and dashboards
Next let's look at the amount column
You'll notice that power query is currently treating it as text instead of a numeric value
So if we leave it this way, we won't be able to perform calculations correctly now to fix this
I'll click the data type icon beside the amounts column header
Then I'll select decimal number now power query
Recognizes the values as number which means we can perform calculations
aggregations and analysis without issues
Before we finish let's take another look at the applied
steps pane
this pane is
Essentially a record of every transformation we've performed
What's great about this is that you can click any step to see what the data looks like at that stage
If you make a mistake, you can delete a step
If necessary, you can even modify or arrange steps
so this flexibility is one of the reasons power query is such a valuable tool for
Analysts and remember these steps are not just cleaning today's data sets
They are creating a repeatable process that can be applied to future data sets as well
Now that our transformation data is clean. Let's bring it back to excel
I'll go back to the home tab in the power query editor then click close and load
Power query will create a new worksheet containing the clean version of our data set and there it is
Our data is now clean is now structured and it is ready for analysis
And the best part is that when next month's data finally arrives
I don't have to repeat all these data cleaning processes again
I can simply replace the source data and refresh the query and then
I have my results power query will automatically repeat
Every transformation that we have created today and that's the real power
Of power query the interesting thing about power query is this what you've done so far is just the beginning
The tool is very powerful
And what we've covered in this video only scratches the face because in real world data, you're not just going to be dealing with
Duplicate or inconsistent text you're also going to run into blank rows that needs to be removed
You're going to run into errors that need to be cleaned or replaced
You're going to see columns that need to be merged into a single field
You're going to have new calculated columns that need to be created and even entire data sets that need reshaping
Before they can be used for analysis and the good thing is power query can handle all that without stress
So you don't need to write
Complex formulas every time you just need to apply your steps once and it becomes a repeatable process
That you can use anytime new data comes in
So everything you've seen in this video is not a one-time skill
It is a workflow that you can keep building on
Now i've kept this video focused on the core basics
So you can clearly understand how power query things but as you continue practicing
You realize that there is so much more to learn and that's the real power
And so it is not just for cleaning it also helps you to build a system that cleans it for you
So take the data set in the description try out these steps yourselves
And then challenge yourself to explore even more transformations inside power query because the more you practice
The more you start thinking like a data analyst and not someone that is just cleaning your data manually and with that said
Let's wrap it up
And that's it we've successfully cleaned a messy transaction data set using power query in this video
We learned how to remove duplicate records
We how to clean and standardize customer name how to split columns into separate fields
how to standardize transaction statuses
Assign the correct data types and build a repeatable
Cleaning workflow and most importantly you've seen how power query can help you to move away from
Repetitive manual cleaning and towards a more automated and efficient process
Remember power query is an incredible power tool
But it works when combined with a solid understanding of data cleaning fundamentals and excel function
And so the goal is not just for you to
Know which buttons to click the goal is for you to understand why you are making this transformation
And how it improves the quality of your data. I hope you found the tutorial helpful
If you did don't forget to like this video subscribe to the channel and let me know in the comments what excel
Power query or data analysis topic you would like me to cover next
Thank you very much for watching and I will see you in the next video