Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† PowerBI for Data Analysis Expert ยท Lesson 3 of 9

Module Two

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
3
Module Two: Data Transformation with Power Query (M)

๐Ÿ”„ Module Two: Data Transformation with Power Query (M)

Welcome back, young data explorer! Today we learn how to clean and shape our data.

๐ŸŒŸ Module Introduction

In Module One, you learned what Power BI is and how to create simple reports. But here is a secret: data is not always clean. Sometimes it has mistakes, missing values, or is in the wrong format. That is where Power Query comes in.

Imagine you are baking a cake. You need to wash and prepare the ingredients before you start. Data is the same. You need to clean and prepare it before you can make beautiful charts.

Power Query is the tool that helps you clean and prepare your data. It is like a magic kitchen where you chop, mix, and prepare your data ingredients.

In this module, you will learn about the Power Query Editor, the M language, and how to clean, shape, and transform your data. By the end, you will be able to turn messy data into clean, analysis-ready data.

๐Ÿ’ก Think about it: Have you ever had a messy room and needed to clean it? Data is the same โ€” you need to clean it before you can use it.

๐ŸŽฏ Learning Objectives

By the time you finish this module, you will be able to:

  • Explain what Power Query is and why it is important.
  • Navigate the Power Query Editor.
  • Clean data by removing duplicates, filtering, and handling nulls.
  • Shape data by pivoting, unpivoting, and merging.
  • Understand the M language and its role in Power Query.
  • Apply data transformations to real datasets.
  • Give examples of how Power Query is used in Nigeria.

๐Ÿ“– Warm-up Story: Nneka's Messy Data

Nneka is a 12-year-old girl who loves to collect data. She asked her classmates about their favourite foods and wrote down their answers. But her notebook was messy. Some names were spelled wrong. Some answers were missing. Some were written in different ways.

Nneka tried to make a chart, but it was hard. She showed her notebook to her uncle, who works with data. Her uncle said, "Nneka, your data is messy. You need to clean it before you can make a chart."

He opened Power BI and showed her the Power Query Editor. Together, they fixed the misspelled names, filled in missing answers, and made everything consistent. Then they created a beautiful chart showing the favourite foods of the class.

Nneka learned that cleaning data is just as important as making charts. Without clean data, your charts can be wrong.

๐Ÿง  Think about it: Have you ever had data that was messy or hard to understand? What did you do?

๐Ÿ“š Main Lessons

1. What is Power Query?

Definition: Power Query is a tool in Power BI that helps you clean, shape, and transform your data before you use it in reports.

Why it is important: Real-world data is often messy. Power Query helps you fix it so your reports are accurate.

Simple explanation: Think of Power Query like a car wash for your data. It cleans off the dirt and makes your data shiny and ready to use.

๐Ÿซ School example: A teacher uses Power Query to clean student data before creating a report.

๐Ÿ  Home example: Your parents use Power Query to clean their expense data before making a budget.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A Nigerian business uses Power Query to clean sales data from different stores.

Illustration:

    +-------------------+
    |  MESSY DATA       |  โ† Data with errors, blanks, and mistakes
    +-------------------+
           |
           V
    +-------------------+
    |  POWER QUERY      |  โ† The cleaning tool
    +-------------------+
           |
           V
    +-------------------+
    |  CLEAN DATA       |  โ† Ready for analysis
    +-------------------+
    

๐Ÿ“Œ Mini summary: Power Query is a tool that cleans and shapes your data.

2. The Power Query Editor

Definition: The Power Query Editor is the window where you clean and transform your data. It shows you a preview of your data and the steps you are applying.

Why it is important: The Power Query Editor gives you full control over how your data is transformed.

Simple explanation: Think of the Power Query Editor like a kitchen. You can see all your ingredients and decide what to do with them.

  • Query List: Shows all the data sources you are working with.
  • Data Preview: Shows a sample of your data.
  • Applied Steps: Shows the list of transformations you have applied.
  • Formula Bar: Shows the M code for the current step.

๐Ÿซ School example: A teacher uses the Power Query Editor to preview student data before cleaning it.

๐Ÿ  Home example: Your parents use the Power Query Editor to see their expense data.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business analyst uses the Power Query Editor to preview sales data.

๐Ÿ“Œ Mini summary: The Power Query Editor is where you clean and transform your data.

3. What is the M Language?

Definition: M is the language that Power Query uses to perform transformations. Every time you click a button in Power Query, it writes M code behind the scenes.

Why it is important: Understanding M helps you create more powerful transformations.

Simple explanation: Think of M like the recipe for your data. It tells Power Query exactly what to do.

  • M is automatic: You don't need to write M code unless you want to.
  • M is powerful: You can do almost anything with M.
  • M is reusable: You can use the same M code on different datasets.

๐Ÿซ School example: A teacher uses the M language to clean student data in a repeatable way.

๐Ÿ  Home example: Your parents use M to clean expense data every month.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business uses M to clean sales data from multiple sources.

// Example of M code let Source = Excel.Workbook(File.Contents("C:\SalesData.xlsx"), null, true), SalesTable = Source{[Item="Sales",Kind="Sheet"]}[Data], #"Removed Duplicates" = Table.Distinct(SalesTable), #"Filtered Rows" = Table.SelectRows(#"Removed Duplicates", each [Region] = "Lagos") in #"Filtered Rows"

๐Ÿ“Œ Mini summary: M is the language Power Query uses to transform data.

4. Opening the Power Query Editor

Definition: To start cleaning your data, you need to open the Power Query Editor.

Why it is important: You can't clean your data without opening the editor.

Simple explanation: Think of it like opening a toolbox to fix something.

  • Step 1: Open Power BI Desktop.
  • Step 2: Click "Get Data" and choose your data source.
  • Step 3: Before loading the data, click "Transform Data".
  • Step 4: The Power Query Editor opens.

๐Ÿซ School example: A teacher opens the Power Query Editor to clean student data.

๐Ÿ  Home example: Your parents open the Power Query Editor to clean expense data.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business analyst opens the Power Query Editor to clean sales data.

Step 1: Open Power BI Desktop Step 2: Click "Get Data" โ†’ Choose Excel Step 3: Select the file Step 4: Click "Transform Data" Step 5: The Power Query Editor opens!

๐Ÿ“Œ Mini summary: The Power Query Editor is opened by clicking "Transform Data".

5. Cleaning Data โ€” Removing Duplicates

Definition: Removing duplicates means deleting rows that are exactly the same.

Why it is important: Duplicates can make your data inaccurate and cause you to count things twice.

Simple explanation: Imagine you have a list of students and one student is listed twice. You would delete the duplicate so you don't count them twice.

  • Step 1: In the Power Query Editor, select the column(s) where you want to remove duplicates.
  • Step 2: Click "Remove Duplicates" in the Home tab.
  • Step 3: Power Query removes the duplicate rows.

๐Ÿซ School example: A teacher removes duplicate student names from a list.

๐Ÿ  Home example: Your parents remove duplicate expense entries.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business removes duplicate customer records.

๐Ÿ“Œ Mini summary: Removing duplicates helps keep your data accurate.

6. Cleaning Data โ€” Filtering Rows

Definition: Filtering rows means keeping only the rows that meet certain conditions.

Why it is important: Filtering helps you focus on the data that matters.

Simple explanation: Imagine you have a list of all students, but you only want to see those in Grade 5. You would filter the list to show only Grade 5 students.

  • Step 1: In the Power Query Editor, click the dropdown arrow on the column you want to filter.
  • Step 2: Select the values you want to keep.
  • Step 3: Power Query filters the rows.

๐Ÿซ School example: A teacher filters student data to show only Grade 5 students.

๐Ÿ  Home example: Your parents filter expenses to show only food expenses.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business filters sales data to show only Lagos sales.

๐Ÿ“Œ Mini summary: Filtering helps you focus on the data that matters.

7. Cleaning Data โ€” Handling Nulls

Definition: A null is a blank or missing value in your data. Handling nulls means deciding what to do with them.

Why it is important: Nulls can cause errors in your reports.

Simple explanation: Imagine you have a list of students, but one student's grade is missing. You need to decide what to do โ€” fill in a grade, or remove that student.

  • Step 1: In the Power Query Editor, select the column with nulls.
  • Step 2: Click "Replace Values" and replace null with a value (like 0 or "Unknown").
  • Step 3: Or, click "Remove Rows" โ†’ "Remove Rows with Errors".

๐Ÿซ School example: A teacher replaces null grades with 0.

๐Ÿ  Home example: Your parents replace null expense amounts with 0.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business replaces null sales amounts with 0.

๐Ÿ“Œ Mini summary: Handling nulls prevents errors in your reports.

8. Shaping Data โ€” Pivoting and Unpivoting

Definition: Pivoting turns rows into columns. Unpivoting turns columns into rows.

Why it is important: Sometimes your data is in the wrong shape for analysis. Pivoting and unpivoting fix that.

Simple explanation: Imagine you have a table with sales for each month in columns. You might want to have a single column for months and another for sales. That is unpivoting.

  • Pivot: Select a column โ†’ Transform โ†’ Pivot Column.
  • Unpivot: Select columns โ†’ Transform โ†’ Unpivot Columns.

๐Ÿซ School example: A teacher unpivots a table of grades by subject.

๐Ÿ  Home example: Your parents unpivot a table of monthly expenses.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business unpivots sales data by quarter.

// Example: Unpivoting data // Before: Region | Q1 | Q2 | Q3 | Q4 // After: Region | Quarter | Sales let Source = Excel.Workbook("SalesData.xlsx"), SalesTable = Source{[Item="Sales"]}[Data], #"Unpivoted Columns" = Table.UnpivotOtherColumns(SalesTable, {"Region"}, "Quarter", "Sales") in #"Unpivoted Columns"

๐Ÿ“Œ Mini summary: Pivoting and unpivoting change the shape of your data.

9. Merging and Appending Data

Definition: Merging combines two tables based on a common column. Appending stacks two tables on top of each other.

Why it is important: Sometimes your data is in multiple tables. Merging and appending help you combine them.

Simple explanation: Imagine you have a list of students and a list of grades. You merge them to have one table with students and their grades.

  • Merge: Home โ†’ Merge Queries.
  • Append: Home โ†’ Append Queries.

๐Ÿซ School example: A teacher merges student data with grade data.

๐Ÿ  Home example: Your parents merge expense data from different sources.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business merges sales data with customer data.

๐Ÿ“Œ Mini summary: Merging and appending help you combine data from multiple sources.

10. Applied Steps โ€” Tracking Your Transformations

Definition: Applied steps are the list of transformations you have applied to your data. You can see them on the right side of the Power Query Editor.

Why it is important: Applied steps help you track what you have done and make changes if needed.

Simple explanation: Think of applied steps like a recipe log. It shows each step you took to cook your data.

  • Each step: Shows the transformation applied.
  • Reorder: You can drag steps to change the order.
  • Delete: You can delete steps that are not needed.
  • Rename: You can rename steps to make them clearer.

๐Ÿซ School example: A teacher renames steps to "Remove Duplicates" and "Filter Grade 5".

๐Ÿ  Home example: Your parents rename steps to "Clean Expenses" and "Remove Nulls".

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian example: A business renames steps to "Merge Sales" and "Filter Lagos".

๐Ÿ“Œ Mini summary: Applied steps help you track your transformations.

๐Ÿ“– Key Vocabulary

Word Simple Meaning
Power Query A tool for cleaning and shaping data.
Power Query Editor The window where you clean and transform data.
M Language The language used by Power Query.
Data Transformation Changing data to make it ready for analysis.
Data Cleaning Removing errors and fixing mistakes in data.
Data Shaping Changing the structure of data.
Duplicate A row that appears more than once.
Filter Keeping only certain rows.
Null A blank or missing value.
Pivot Turning rows into columns.
Unpivot Turning columns into rows.
Merge Combining two tables based on a common column.
Append Stacking two tables on top of each other.
Applied Steps The list of transformations applied.
M Code The code written in the M language.

๐Ÿงฉ Important Concepts

  • Power Query is used to clean and shape data.
  • M is the language of Power Query.
  • Removing duplicates keeps data accurate.
  • Filtering helps you focus on what matters.
  • Handling nulls prevents errors.
  • Pivoting and unpivoting change data shape.
  • Merging and appending combine data.
  • Applied steps help you track transformations.

๐Ÿ“Œ Step-by-Step Explanations

How to clean data in Power Query

  1. Open Power BI Desktop: Click the icon on your computer.
  2. Get Data: Click "Get Data" and choose your data source.
  3. Open Editor: Click "Transform Data" to open the Power Query Editor.
  4. Remove Duplicates: Select the column(s) and click "Remove Duplicates".
  5. Filter Rows: Click the dropdown arrow on a column and select values to keep.
  6. Handle Nulls: Click "Replace Values" to fill nulls or "Remove Rows" to delete them.
  7. Apply Changes: Click "Close & Apply" to save your changes.

How to shape data in Power Query

  1. Open Power Query Editor: As above.
  2. Pivot: Select a column, click "Transform", and choose "Pivot Column".
  3. Unpivot: Select columns, click "Transform", and choose "Unpivot Columns".
  4. Merge: Click "Merge Queries" and select the second table.
  5. Append: Click "Append Queries" and select the second table.
  6. Apply Changes: Click "Close & Apply".

๐ŸŒ Real-life Examples

  • School: A teacher cleans student data by removing duplicates and filling in missing grades.
  • Hospital: A hospital cleans patient data by removing errors and filling in missing information.
  • Restaurant: A restaurant cleans sales data by filtering out cancelled orders.
  • Shop: A shop cleans inventory data by removing duplicate product entries.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian Examples

  • Paystack: Uses Power Query to clean payment data.
  • Flutterwave: Uses Power Query to clean transaction data.
  • MTN Nigeria: Uses Power Query to clean customer data.
  • A Lagos supermarket: Uses Power Query to clean sales data.
  • A Nigerian bank: Uses Power Query to clean branch data.

๐ŸŽˆ Fun Examples for You

  • Your toy collection: You can clean your toy list by removing duplicate toys.
  • Your game scores: You can clean your game scores by removing errors.
  • Your reading log: You can clean your reading log by filtering out incomplete entries.
  • Your chores: You can clean your chore list by removing duplicates.

๐Ÿ  Everyday Examples

  • At home: Your parents clean expense data by removing duplicate entries.
  • At school: Your teacher cleans student data by removing errors.
  • In your community: Local businesses clean sales data by filtering out returns.
  • In your own life: You can clean your personal data by removing duplicates.

๐Ÿ‘ฉโ€๐Ÿซ Teacher Notes

  • Encourage students to think about messy data they have encountered.
  • Use the warm-up story to spark interest in data cleaning.
  • Demonstrate the Power Query Editor with a simple dataset.
  • Discuss why cleaning data is important for accurate reports.
  • Ask students to think about how they would clean different types of data.

๐Ÿ‘ช Parent Tips

  • Talk to your child about how you clean data in your work or daily life.
  • Show your child how you clean expense or other data.
  • Download Power BI Desktop and explore Power Query together.
  • Encourage your child to think about how they would clean different types of data.
  • Share examples of Nigerian businesses using Power Query.

๐Ÿง  Interesting Facts

  • Power Query was first introduced in Excel in 2010.
  • The M language is named after the "M" in "Data Mashup."
  • Power Query can connect to over 100 different data sources.
  • Power Query is used by millions of people worldwide.
  • You can use Power Query in Excel and Power BI.

๐Ÿ’ก Did You Know?

  • Did you know that Power Query can clean data from Nigerian bank statements?
  • Did you know that you can use Power Query to clean data from web pages?
  • Did you know that the M language is case-sensitive?
  • Did you know that Power Query can automatically detect data types?
  • Did you know that many Nigerian businesses use Power Query to clean data?

๐Ÿ”” Remember This

  • Power Query is for cleaning and shaping data.
  • M is the language of Power Query.
  • Removing duplicates keeps data accurate.
  • Filtering helps you focus on what matters.
  • Handling nulls prevents errors.
  • Pivoting and unpivoting change data shape.
  • Merging and appending combine data.
  • Applied steps help you track transformations.

โš ๏ธ Common Mistakes

  • Not cleaning data: Using dirty data leads to wrong reports.
  • Removing the wrong duplicates: Always check which rows you are removing.
  • Over-filtering: Removing too much data can lead to incomplete reports.
  • Ignoring nulls: Nulls can cause errors in your reports.
  • Not renaming steps: It is hard to understand what you did if steps are not named.

โœจ Best Practices for Power Query

  • Always preview your data before cleaning.
  • Remove duplicates carefully.
  • Filter data to focus on what matters.
  • Handle nulls to avoid errors.
  • Rename your applied steps for clarity.
  • Test your transformations on a small sample first.
  • Keep a backup of your original data.

๐Ÿ“Š Clear Illustrations

1. The Data Cleaning Process

    +-------------------+
    |  MESSY DATA       |  โ† Data with errors, blanks, and mistakes
    +-------------------+
           |
           V
    +-------------------+
    |  REMOVE DUPLICATES |  โ† Delete duplicate rows
    +-------------------+
           |
           V
    +-------------------+
    |  FILTER ROWS      |  โ† Keep only what you need
    +-------------------+
           |
           V
    +-------------------+
    |  HANDLE NULLS     |  โ† Fill or remove blanks
    +-------------------+
           |
           V
    +-------------------+
    |  CLEAN DATA       |  โ† Ready for analysis
    +-------------------+
    

2. Pivoting vs. Unpivoting

    +-------------------+
    |  BEFORE           |  โ† Region | Q1 | Q2 | Q3 | Q4
    +-------------------+
           |
           V
    +-------------------+
    |  UNPIVOT          |  โ† Region | Quarter | Sales
    +-------------------+
    

3. Merging vs. Appending

    +-------------------+
    |  MERGE            |  โ† Combine tables side by side
    +-------------------+
    |
    +-------------------+
    |  APPEND           |  โ† Stack tables on top of each other
    +-------------------+
    

4. Comparison: Clean vs. Dirty Data

Dirty Data Clean Data
Duplicates No duplicates
Missing values No missing values
Errors No errors
Inconsistent formatting Consistent formatting
Hard to analyse Easy to analyse

๐Ÿ“ Lesson Summaries

Lesson 1: Power Query is a tool for cleaning and shaping data.

Lesson 2: The Power Query Editor is where you clean and transform data.

Lesson 3: M is the language of Power Query.

Lesson 4: Open the Power Query Editor by clicking "Transform Data".

Lesson 5: Removing duplicates keeps data accurate.

Lesson 6: Filtering helps you focus on what matters.

Lesson 7: Handling nulls prevents errors.

Lesson 8: Pivoting and unpivoting change data shape.

Lesson 9: Merging and appending combine data.

Lesson 10: Applied steps help you track transformations.

๐Ÿ“˜ End-of-Module Summary

In this module, you learned about Power Query โ€” the tool for cleaning and shaping data. You discovered the Power Query Editor, the M language, and how to clean data by removing duplicates, filtering, and handling nulls. You also learned how to shape data by pivoting, unpivoting, merging, and appending.

๐ŸŽฏ You can now:

  • Explain what Power Query is and why it is important.
  • Navigate the Power Query Editor.
  • Clean data by removing duplicates, filtering, and handling nulls.
  • Shape data by pivoting, unpivoting, and merging.
  • Understand the M language and its role in Power Query.
  • Apply data transformations to real datasets.
  • Give examples of how Power Query is used in Nigeria.

โ“ Frequently Asked Questions

1. What is Power Query?
Power Query is a tool for cleaning and shaping data.
2. What is the Power Query Editor?
The Power Query Editor is where you clean and transform data.
3. What is the M language?
M is the language used by Power Query.
4. Why is data cleaning important?
Data cleaning prevents errors and makes your reports accurate.
5. How do you remove duplicates?
Select the column(s) and click "Remove Duplicates".
6. What is filtering?
Filtering keeps only the rows you want.
7. What are nulls?
Nulls are blank or missing values.
8. What is the difference between pivoting and unpivoting?
Pivoting turns rows into columns. Unpivoting turns columns into rows.
9. What is the difference between merging and appending?
Merging combines tables side by side. Appending stacks tables on top of each other.
10. What are applied steps?
Applied steps are the list of transformations you have applied.

๐Ÿ“ Review Questions (15)

  1. What is Power Query?
  2. What is the Power Query Editor?
  3. What is the M language?
  4. Why is data cleaning important?
  5. How do you remove duplicates?
  6. What is filtering?
  7. What are nulls?
  8. How do you handle nulls?
  9. What is the difference between pivoting and unpivoting?
  10. What is the difference between merging and appending?
  11. What are applied steps?
  12. Give an example of a Nigerian business using Power Query.
  13. What is the first step in cleaning data?
  14. Why should you rename your applied steps?
  15. What is the best practice for testing transformations?

โœ๏ธ Fill-in-the-Blank Exercises

  1. Power Query is a tool for __________ and shaping data.
  2. The __________ language is used by Power Query.
  3. Removing __________ keeps data accurate.
  4. Filtering helps you focus on what __________.
  5. __________ are blank or missing values.

โœ… True or False Exercises

  1. Power Query is only for Excel. (False)
  2. M is the language of Power Query. (True)
  3. Removing duplicates keeps data accurate. (True)
  4. Filtering removes all data. (False)
  5. Handling nulls prevents errors. (True)

๐Ÿ”˜ Multiple Choice Questions

  1. What is Power Query?
    A) A tool for cleaning data B) A game C) A type of food D) A sport
    Answer: A
  2. What is the M language?
    A) The language of Power Query B) A type of chart C) A database D) A filter
    Answer: A
  3. What is the Power Query Editor?
    A) Where you clean data B) A game C) A type of food D) A sport
    Answer: A
  4. Why is data cleaning important?
    A) It prevents errors B) It makes data messy C) It deletes data D) It hides data
    Answer: A
  5. How do you remove duplicates?
    A) Click "Remove Duplicates" B) Click "Add Duplicates" C) Click "Delete All" D) Click "Save"
    Answer: A
  6. What is filtering?
    A) Keeping only certain rows B) Deleting all rows C) Adding new rows D) Changing column names
    Answer: A
  7. What are nulls?
    A) Blank or missing values B) Duplicate values C) Numbers D) Text
    Answer: A
  8. What is the difference between pivoting and unpivoting?
    A) Pivoting turns rows into columns, unpivoting turns columns into rows B) They are the same C) Pivoting deletes data D) Unpivoting deletes data
    Answer: A
  9. What is the difference between merging and appending?
    A) Merging combines tables side by side, appending stacks them B) They are the same C) Merging deletes data D) Appending deletes data
    Answer: A
  10. What are applied steps?
    A) The list of transformations B) The data itself C) The charts D) The filters
    Answer: A
  11. Which of these is a Nigerian business using Power Query?
    A) Paystack B) Flutterwave C) MTN D) All of the above
    Answer: D
  12. What is the first step in cleaning data?
    A) Preview the data B) Delete the data C) Create a chart D) Save the data
    Answer: A
  13. Why should you rename your applied steps?
    A) To make them clearer B) To delete them C) To hide them D) To change the data
    Answer: A
  14. What is the best practice for testing transformations?
    A) Test on a small sample B) Test on all data C) Do not test D) Test after loading
    Answer: A
  15. What is the purpose of Power Query?
    A) To clean and shape data B) To create charts C) To play games D) To send emails
    Answer: A

๐Ÿ”— Matching Exercises

Match the word on the left with the correct meaning on the right:

Word Meaning
Power Query The language of Power Query
M Language A tool for cleaning data
Duplicate A row that appears more than once
Null A blank or missing value

Answers: Power Query โ†’ A tool for cleaning data; M Language โ†’ The language of Power Query; Duplicate โ†’ A row that appears more than once; Null โ†’ A blank or missing value.

๐Ÿ“ Short Answer Questions

  1. Explain Power Query in your own words.
  2. Why is data cleaning important?
  3. What is the M language?
  4. How do you remove duplicates?
  5. Give an example of a Nigerian business using Power Query.

๐ŸŽญ Scenario-based Exercises

Scenario 1: Nneka has a list of students with their grades. Some students are listed twice, and some grades are missing. What should Nneka do? How can Power Query help her?

Scenario 2: A Lagos supermarket has sales data in different tables. They want to combine the data to see total sales by product. How can Power Query help them?

๐Ÿ‘ฅ Group Activity

In groups of 4โ€“5, discuss a type of messy data you have encountered. Think about how you could use Power Query to clean it. Present your ideas to the class.

๐Ÿง‘ Individual Activity

Think about a dataset you could clean. Write a short paragraph (about 100 words) about how you would use Power Query to clean it.

๐Ÿ—ฃ๏ธ Classroom Discussion Questions

  1. Why is data cleaning important?
  2. What kind of messy data have you seen?
  3. How can Power Query help Nigerian businesses?
  4. What is the most interesting thing you learned about Power Query?
  5. How do you think Power Query will change in the future?

๐Ÿ› ๏ธ Mini Project

Clean a Dataset

Find a messy dataset (e.g., a list of sales with duplicates and missing values). Use Power Query to clean it. Document the steps you took and the final result.

๐Ÿ“‹ Practical Assignment

Download a sample dataset with errors. Use Power Query to clean it by removing duplicates, handling nulls, and filtering. Write a short report (about 150 words) about what you did and what you learned.

๐Ÿ† Challenge Exercise

The Challenge: Imagine you are a business analyst in Lagos. You have sales data from four different stores, each in a different format. Use Power Query to clean and combine the data. Create a single table with all sales data.

๐Ÿ” Quiz Answers

Multiple Choice: 1-A, 2-A, 3-A, 4-A, 5-A, 6-A, 7-A, 8-A, 9-A, 10-A, 11-D, 12-A, 13-A, 14-A, 15-A

Fill-in-the-Blank: 1. cleaning, 2. M, 3. duplicates, 4. matters, 5. Nulls

True or False: 1. False, 2. True, 3. True, 4. False, 5. True

Matching: Power Query โ†’ A tool for cleaning data; M Language โ†’ The language of Power Query; Duplicate โ†’ A row that appears more than once; Null โ†’ A blank or missing value.

๐ŸŽฏ Key Takeaways

  • Power Query is a tool for cleaning and shaping data.
  • M is the language of Power Query.
  • Removing duplicates keeps data accurate.
  • Filtering helps you focus on what matters.
  • Handling nulls prevents errors.
  • Pivoting and unpivoting change data shape.
  • Merging and appending combine data.
  • Applied steps help you track transformations.
  • Nigerian businesses use Power Query to clean data.
  • Anyone can learn to use Power Query.

๐Ÿ”œ Preparation for Module Three

In the next module, we will explore Data Modeling and Relationships. You will learn how to build robust data models and create relationships between tables. Before then, try to think about how different tables of data can be connected.


๐ŸŽ‰ Congratulations! You have completed Module Two of the Power BI for Data Analysis Expert course.

๐Ÿ‘ You are now ready to move to Module Three: Data Modeling and Relationships.

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’