0% found this document useful (0 votes)
10 views16 pages

Module 4 Notes

Module 4 covers the Query Editor in Power BI, emphasizing its role in importing, transforming, and preparing data for analysis. It details the four main tabs—Home, Transform, Add Column, and View—each serving specific functions for data manipulation. The module also introduces the concept of Applied Steps, which tracks changes made to the data, and the Advanced Editor for viewing and editing the underlying M code for transformations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views16 pages

Module 4 Notes

Module 4 covers the Query Editor in Power BI, emphasizing its role in importing, transforming, and preparing data for analysis. It details the four main tabs—Home, Transform, Add Column, and View—each serving specific functions for data manipulation. The module also introduces the concept of Applied Steps, which tracks changes made to the data, and the Advanced Editor for viewing and editing the underlying M code for transformations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Module 4

Lesson 1
[Part 1 – Deep Dive into the Query Editor]
“So let’s start from the very top: What is the Query Editor? If you’ve worked with
Excel, think of it like the Power Query tool built into Excel, but on steroids. The
Query Editor allows you to import data, apply transformations like cleaning and
reshaping, and build a logic sequence that Power BI remembers and re-applies
every time your data updates.”
“Once you're in Power BI Desktop and you load a data source, say an Excel
workbook, you’ll often see an option that says Transform Data. Clicking that doesn’t
load the data into the report view just yet. Instead, it launches the Query Editor, a
special sandbox where you can play around with the data before committing it to
the main workspace.”
Let’s do a quick demonstration of how to open the Query Editor. If you’re
following along, open Power BI Desktop right now.
“Now click on Home > Get Data > Excel, and select a sample dataset—anything
will do, but I’m using one named RetailSales.xlsx. After selecting a table from the
Navigator, click on Transform Data. That opens up our friend, the Query Editor.”
“Look around the interface. Do you see the four tabs at the top? These are where all
your transformation power lives. Let's explore each of these tabs one by one in
detail.”
Home Tab – The Central Command Hub
“The Home tab is like your main dashboard. This is where you start most basic
tasks: importing data, removing columns, reducing rows, merging tables, appending
datasets, and managing queries. You'll also see buttons like Close & Apply, which
saves your changes and pushes your cleaned data into the Power BI data model.”
“Here’s a little pro tip: If you're not sure whether to remove or hide a column, think
about your end goal. If the column isn't relevant for your visualizations or
calculations, go ahead and remove it. Hiding only keeps it out of visuals but still in
the model, which can impact performance.”
Transform Tab – Your Data Laboratory
“Next, click on the Transform tab. This is where things get exciting. You can apply
deeper transformations like transposing rows and columns, pivoting and unpivoting
data, splitting text, and changing data types. For example, if you have a column
with full names, you can split it into First Name and Last Name using this tab. It also
includes very useful buttons for replacing values, detecting data types, and
formatting columns.”
Group Question #1: “Why would you want to unpivot data? When might
this be useful in real life?”
Sample Talking Points:
 “Sometimes, sales data is stored with months as column headers—unpivoting
lets you restructure it so that months are in a single column, making it easier
to filter or group.”
 “This is useful when working with time series data, or when prepping data for
line or bar charts.”
Add Column Tab – Creating New Fields
“Let’s now move to the Add Column tab. This tab is great when you want to create
something new based on existing data. You can add custom columns, index
columns, or conditional columns.”
“For instance, suppose you want to assign a category based on sales amount:
anything over $10,000 is ‘High’, under $5,000 is ‘Low’, and in between is ‘Medium’.
That’s where you’d add a conditional column here. It's a lot like Excel’s IF function,
but easier to manage.”
“Another very handy feature here is the Index Column. This is particularly useful
when you want to create row numbers or need a way to uniquely identify rows
before merging or sorting.”
View Tab – Toggling Interface Options
“And lastly, we have the View tab. This is where you decide what parts of the Query
Editor interface you want to see. For example, you can show or hide the Formula
Bar, which displays the M code behind each step. You can also toggle the Query
Settings pane or choose to see white or dark background themes for your
workspace.”
Mini Demo Prompt:
“Let’s quickly try toggling the Formula Bar. Just go to the View tab and check or
uncheck the box next to ‘Formula Bar’. Now go back to a column you transformed
earlier—notice how you can see the formula that was used?”
“This helps when you want to copy that logic or just learn what M code looks like
behind the scenes.”
[Part 2 – Applied Steps: Understanding the History of Every Change]
“Now that we’re familiar with the interface, let’s talk about one of the most powerful
features in the Query Editor: Applied Steps. This section lives on the right side of
the Power Query Editor window. I like to call it the ‘history log’ of your data cleanup.
Every little thing you do—whether you rename a column, filter rows, change a data
type—is recorded here automatically.”
“Why is this important? Imagine this: You’ve made 10 changes to your dataset.
Then someone asks, ‘Hey, what exactly did you change in that file last week?’
Instead of trying to remember, all you need to do is look at the Applied Steps panel.
It shows you everything you’ve done in the exact order.”
“Let’s break down how it works. When you first load a dataset, the very first step is
usually called Source. This step simply says, ‘Here’s where the data came from.’ It
might be a file path for an Excel sheet or a connection string for a database.”
“Next, there’s a step called Navigation, which specifies the sheet or table you
selected. From here on, every transformation you apply creates a new step. This
might include things like:
 Renaming a column
 Removing a column
 Filtering rows
 Changing data types
 Replacing values
 Adding an index
Now here’s the best part: each step is editable. You can go back to any of them and
tweak it. You can rename the step so it makes more sense, especially if you’re
working in a team. You can reorder steps, although be careful—Power BI might
throw an error if one step depends on a previous one that you’ve moved.”
“Let me pause here and ask: Why might reordering or deleting steps cause errors in
Power BI?”
Sample student responses:
 “Because later steps might rely on data that’s only available after an earlier
transformation.”
 “Removing a column in Step 3 might cause Step 5 to break if that column was
used there.”
“Exactly! Power BI is smart, but not psychic. If you delete a column and then try to
perform a function on that column later, it will throw an error. So always be mindful
of the dependencies between steps.”

[Part 3 – Advanced Editor: Seeing and Understanding the M Code]


“Now, let’s pull back the curtain. You’ve been using the point-and-click interface to
build your queries, but what if I told you everything you’re doing is being translated
into code behind the scenes? That’s right. Power BI has its own formula language
called M, and every transformation you apply is written in this language.”
“To view it, you go to the View tab and click on Advanced Editor. Alternatively,
you can find it on the Home tab under the same name.”
“When you open the Advanced Editor, you’ll see a script that starts with let and
ends with in. This script represents all your Applied Steps. Each transformation is a
line in this code.”
“Let’s look at an example. If you removed a column called ‘Region’, you’ll see
something like this in the M code:
m
CopyEdit
#"Removed Columns" = Table.RemoveColumns(Source, {"Region"})
That line says, ‘From the Source step, remove the column named Region.’ The
beauty here is that you can actually edit this code manually—maybe to add multiple
columns at once, or to write a custom logic.”
Reflection Question:
“Why might someone choose to use the Advanced Editor instead of the regular
GUI?”
Sample responses:
 “To make bulk edits faster.”
 “To copy code between queries or reports.”
 “To reuse a transformation in another dataset.”
“Those are great reasons! Also, some transformations just aren’t available in the
visual interface, especially if you’re combining advanced logic from multiple steps.
M code can save the day there.”
“Now a word of caution: this editor is very sensitive to syntax. If you forget a
comma or quotation mark, Power BI will show you an error immediately. That’s why I
suggest beginners only view the code to learn at first, and then try small changes
with the help of Google or documentation.”

[Part 4 – Demonstration: Applied Steps and Advanced Editor in Action]


“Let’s do a guided demonstration now. I want everyone to open Power BI Desktop
and load the sample file named EmployeeData.xlsx. You can use any file, but make
sure it has at least a few columns like Name, Department, Salary, and Joining Date.”
Step-by-step live demonstration (repeat aloud as students follow):
1. “Go to Home > Get Data > Excel, and select the file.”
2. “From the Navigator, choose any sheet—say, Sheet1—and click Transform
Data.”
3. “Welcome to the Query Editor. On the right-hand side, you should already see
two Applied Steps: Source and Navigation.”
4. “Now, let’s rename the column Salary to Annual Salary. Right-click the
column and choose Rename. Look—Power BI adds a step called Renamed
Columns.”
5. “Next, click on the Joining Date column, go to Transform tab, and choose
Data Type > Date.”
6. “Notice how another step is created—Changed Type. This step lets Power BI
know you want the field to be treated as a Date, not text.”
7. “Now click on the View tab and open the Advanced Editor. You should see
all the M code we’ve just generated!”
Highlight each step in the M code as you explain.
“Let’s try one more thing: go back to the Applied Steps and rename one of them.
Right-click Changed Type, select Rename, and call it Set Join Date Format. See how
easy it is to make your workflow more understandable?”
“Now let’s try deleting a step. Click the X next to your renamed column. Power BI
will remove it—and you’ll see the column’s name go back to Salary.”
“Lastly, let’s add a column. Go to the Add Column tab, click on Index Column,
and choose From 1. Power BI adds an index to every row and records that step as
well.”

[Group Practice and Review – Applied Steps Challenge]


“I’m going to give you all a challenge now. In groups of 3, perform the following
tasks and document what happens in the Applied Steps pane.”
Group Challenge:
 Load a dataset with at least 5 columns
 Remove one column
 Change data type of another column
 Rename a third column
 Add an Index column
 Finally, open the Advanced Editor and observe the M code
“I’ll give you 15 minutes in breakout rooms to complete this. Each group should pick
one person to share what they discovered when we return.”
[After breakout sessions…]
“Alright, welcome back! Can someone from Group 2 walk us through your Applied
Steps and any surprises you noticed?”
Sample answer:
“We realized that deleting a step sometimes caused errors later, so we had to undo
and reorder steps carefully. We also saw how the M code exactly matched our
transformations.”

[Closing Summary and Next Steps]


We started by introducing the Power BI Query Editor, which is more than just a
feature—it’s a complete environment where your raw data transforms into a usable
format. We talked about how essential it is to clean and shape data before we build
any reports or dashboards. It’s like preparing ingredients before cooking. The Query
Editor allows us to inspect, organize, and fix data issues without affecting the
original file.”
“We explored the four primary tabs in the Query Editor—Home, Transform, Add
Column, and View—and saw how each of them serves a unique function. The
Home tab gives us quick access to commonly used tools like importing, removing,
or appending data. The Transform tab offers us the real power to pivot, transpose,
replace values, split columns, and more. With Add Column, we learned how to
generate new columns, like indexes or conditionals, which are particularly useful in
categorizing or organizing the data further. And in the View tab, we saw how we can
customize our interface to show or hide features such as the formula bar or query
settings—something that helps keep our workspace clean and focused.”
“Next, we focused on Applied Steps. And honestly, this might be the most
underrated feature of Power BI. Why? Because it tracks your every action and lets
you revisit, edit, or undo anything. Just think about how helpful that is. You don’t
need to remember what you changed or why—you just click through your
transformation history on the right. You can rename steps to make them clearer,
reorder them carefully when needed, or even remove them completely. That’s the
kind of transparency and control that’s hard to find in other tools. We also
emphasized how steps are sequential and interdependent, so you need to be
cautious when modifying them.”
“After that, we lifted the hood and took a peek at what’s happening behind the
scenes using the Advanced Editor. This was a game-changer for many of you,
especially those of you with a programming mindset or a desire to automate
processes. The Advanced Editor exposed us to M language, a powerful scripting
language that Power BI uses to apply transformations. We learned that every action
in the Query Editor is automatically converted into a line of M code—and that
understanding this code gives you more power and flexibility. Even if you’re not
planning to write M code manually, being able to read and recognize it can help you
debug problems and share transformations with teammates more effectively.”
Lesson 2
Today, we’re diving into a super important topic: Shaping Data. This might sound
like a simple idea—like moving things around—but trust me, shaping data is the
foundation of everything we do in Power BI. And once you get comfortable with this,
the rest of your reporting journey becomes much easier.”
“Now, before we dive in, I want to hear from you. Type in the chat—or unmute and
share: When you hear the phrase “shaping data,” what comes to mind? What do
you imagine you’d be doing in Power BI?”
[Wait for 2–3 student inputs.]
“Thanks for those answers! And yes—you’re on the right track. Shaping data is all
about transforming, cleaning, and organizing your data so it’s ready for analysis and
reporting. Just like a sculptor shapes clay into something meaningful, we’re shaping
data to make it accurate, clear, and usable. And what’s really cool? Every step we
take is recorded by Power BI behind the scenes, so we can always trace our work.”

🧩 What is Shaping Data?


“Let’s start with the formal definition. Shaping data is the process of transforming
and formatting your data for optimal presentation and analysis in Power BI
reports. It’s not just about tidying up—it’s about building the structure your report
will depend on. It includes activities like removing unnecessary columns, renaming
confusing headers, fixing data types, creating new calculated columns, and even
applying sort logic.”
“And let me be clear: shaping data doesn’t touch your original Excel file or
database. It all happens inside Power BI’s Query Editor—like a sandbox where you
can try anything without affecting the source file.”
“Every shaping step—every small change you make—is recorded in the Applied
Steps panel. Think of it like a trail of breadcrumbs. You’ll always know what changes
you made, in what order, and you can go back, delete, modify, or rename any step.”
“Now, when should you shape data? Almost always. Let’s say you import an Excel
sheet. The column names might be inconsistent, the data types might be wrong,
and there might be thousands of unnecessary rows. That’s where shaping helps.”
“For example, you might:
 Remove extra columns like notes or flags that aren't relevant
 Rename technical names like Trans_ID to something more readable like
Transaction ID
 Make sure that Date columns are actually set to the Date type and not just
text
 Use Power BI’s date functions to extract Month, Quarter, or Year
 Add indexes to track or sort records, especially if the data comes in unsorted
 Sort rows based on priority, date, or value—even when the data isn't sorted
in Excel
These are all examples of shaping steps. And the beauty is, Power BI handles this
automatically behind the scenes—logging every single step so you can trace, redo,
or fix things later.”
Instructor Prompt (Student Engagement):
“Think back to a time you worked with an Excel sheet or Google Sheet. Were there
moments you had to clean it up before sharing it with someone? Drop a message in
the chat if that rings a bell.”
[Let students share their experiences.]
“That’s exactly the point! Whether you’re formatting a simple list for your manager
or preparing a report for hundreds of stakeholders, shaping is part of the process.”

🧽 Formatting Data
“Alright, let’s zoom in now on formatting, which is a key sub-part of shaping.
Formatting is about improving how data looks and behaves—without changing the
content.”
“Power BI makes this easy through the Query Editor. And within the Query Editor,
we have tons of formatting options across text, numbers, and columns.”
“Let’s start with the General group. Here, you can:
 Add custom columns using formulas (like Excel’s IF, but cleaner)
 Duplicate existing columns, which is helpful when you want to retain the
original while experimenting
 Add Index columns, which can be useful for tracking changes or providing
unique identifiers—especially when the original data has none”
“In the From Text section, we get string-based functions. This includes:
 Changing case (uppercase, lowercase, capitalize each word)
 Removing unnecessary spaces (Trim)
 Cleaning invisible characters (Clean)
 Adding prefixes or suffixes—for example, appending ‘_2024’ to all project
names
 Merging columns—say combining First Name and Last Name into Full Name,
with a space between
These are small actions, but they make your dataset readable and clean.”
“Then we have the From Numbers section. This is where you can:
 Add or subtract fixed values to an entire column
 Multiply or divide values—great for converting units or adding markup/taxes
 Create derived fields like Revenue per Unit or Profit Margin with just a few
clicks
And remember—Power BI tracks all these formatting steps. If you open the Formula
Bar or Advanced Editor, you’ll see each transformation written in M language.
That means you can review or tweak any logic later.”
Reflection Prompt:
“Can you think of a field in a dataset that looked okay at first but turned out to be
badly formatted? Like maybe a phone number column or a ‘Yes/No’ field? Let’s hear
a few examples.”
[Give time for responses.]
“These are great. Exactly why formatting is so essential—it ensures our data
behaves properly inside charts, tables, and slicers.”

🔄 Transforming Data
“Now let’s talk about the heavy lifting part of shaping: transforming data. This is
where we actually restructure, clean, and reorganize data to prepare it for
relationships and visuals.”
“Let’s start with the Table group. This is where we can:
 Group data by a field—for example, total sales by region, number of orders
per customer, average spending per branch
 Promote the first row to become headers—very useful when Excel exports
don’t include proper headers
 Transpose tables—this flips rows and columns, useful for fixing reports where
months are laid out as columns
 Reverse rows—handy for flipping chronologically sorted data”
“Then we have the Any Column group. This gives you tools to:
 Detect or change data types—absolutely critical for using fields in visuals or
filters
 Replace specific values—like changing all instances of ‘NA’ to ‘Not Available’
 Replace errors—for example, replace all #DIV/0 with a default value
 Fill null values using the value above or below—perfect for handling headers
spread across multiple rows
 Pivot or unpivot columns—essential for restructuring flat tables into tall,
analysis-ready formats
 Move columns—if your visuals or logic rely on a certain order”
“And in the Text Column group, you can:
 Split one column into multiple—say splitting [email protected] into
username and domain
 Split full names into first and last
 Split dates from timestamps
 Extract left, right, or middle segments from a string”
Instructor Storytelling Tip:
“Here’s a true story—I once worked with a client that had a ‘Product Description’
field that included color, size, and model number in one long string. We had to split
it out into three new fields using these text functions—and once we did, suddenly
their filtering, sorting, and even sales reporting improved drastically. That’s the
impact of transforming data properly.”

🔧 Demonstration: Transforming Data with the Query Editor


“Okay everyone, let’s now put theory into practice. We’re going to walk through a
live demo together using Power BI Desktop. You can follow along with me and do
each step in your own Power BI window.”
Walkthrough (Repeat aloud as students follow):
“First, click Home > Get Data > Excel and choose a file named
ShapingDemo.xlsx. Select the CustomerOrders sheet and click Transform Data.”
“Now in the Query Editor:
1. First, remove the column named PhoneNumber. Right-click on it and select
Remove.
2. Next, rename Cust_ID to Customer ID, and OrderAmt to Total Order Amount.
3. Click on OrderDate, go to Transform > Data Type, and set it to Date.
4. Now go to Add Column > Index Column > From 1. This will add a new
column called Index starting from 1.
5. Select the Total Order Amount column, go to Transform > Standard >
Multiply, and multiply the values by 1.13 to simulate tax-included pricing.
6. Then go to Transform > Group By, and group by Customer ID, summing the
Total Order Amount.
7. Finally, open the Advanced Editor and observe how each of your actions
has been converted into M code.”
“Pause for a moment and scroll through the Applied Steps pane. This is your
shaping history. You’ve now shaped, formatted, and transformed your dataset step-
by-step.”

Summary:
In Lesson 2: Shaping Data, students learned how to use Power BI’s Query Editor to
clean, format, and transform data for accurate analysis and reporting. The session
covered how shaping data involves making changes—like removing or renaming
columns, fixing data types, and restructuring tables—without altering the original
source. Students practiced formatting text and numbers, creating custom and index
columns, using transformation tools such as group by, split, pivot, and unpivot, and
explored how every action is tracked in the Applied Steps and reflected in M code.
By the end of the lesson, students could confidently prepare structured, reliable
datasets ready for visualization.

Lesson 3
So far, we’ve learned how to load, shape, and transform data using the Query
Editor. Today, we’re moving on to something a bit more advanced—but very exciting
and powerful—Combining Data. This is one of the real superpowers of Power BI.”
“Think about it like this: in the real world, data rarely lives in one place. Your sales
data might be in Excel, your product details in a database, your pricing info online,
and your HR data in a separate CSV file. As analysts or developers, it’s our job to
bring all of that together and make sense of it—and that’s exactly what today’s
session is about.”
“So we’ll learn how to import data from web sources, how to shape that new
data, and then how to merge or append it with our existing datasets to build a
full, connected data model. This will be hands-on and practical, so have Power BI
Desktop open and ready.”

🌐 Adding Data from the Internet


“Let’s start with something really cool—importing data from the web. Yes, Power
BI can connect directly to a webpage and pull structured tables from it. And if that
website updates regularly—say, it’s showing daily currency rates or COVID stats—
you can refresh the report and get the latest numbers instantly.”
“To do this, we go to Home > Get Data > Web and then paste in the URL of a site
that contains tabular data. Power BI reads the page, finds the tables, and lets us
select one to load.”
“Let me give you a real-world example. Let’s say you work for a travel company,
and you want to display current visa-free destinations for passport holders. You can
pull that table directly from a Wikipedia page. Or maybe you work for a non-profit
tracking global statistics—you can import tables from government or World Bank
data sites.”
Live Demonstration – Web Data Import (Follow Along)
“Let’s do this together. Please follow along with me.”
1. Open Power BI Desktop.
2. Click on Home > Get Data > Web.
3. In the URL box, paste this link:
https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)
4. Click OK. Power BI will analyze the page and show you a Navigator window.
5. Select the table titled ‘GDP by country (nominal)’—you’ll see it as a preview.
6. Click Transform Data.
“You’re now inside the Query Editor. What you’ve done here is import a live dataset
from the internet into Power BI! Now, a quick heads-up: always verify if the site
structure might change or disappear. Power BI doesn’t control external pages—so if
a table is removed or reformatted, the query might break. This is especially true for
free, public sources.”

🧽 Shaping the New Data


“Now, just like any other dataset, web data isn’t always perfect. We need to shape it
before we can use it in visuals or combine it with other tables.”
“Let’s look at our GDP data. Maybe we want to:
 Remove columns we won’t use (like footnotes or ranking changes)
 Rename columns from ‘Country/Territory’ to just ‘Country’
 Fix data types—maybe the GDP figures came in as text with commas and
symbols
 Sort countries by GDP value
 Ensure our changes are all logged in Applied Steps
Let’s do that now together.”
Live Shaping – Continue with Existing Web Data
1. Click on the column GDP(US$million)—you’ll probably notice it’s still a text
field because of the dollar signs and commas.
2. Go to Transform > Data Type > Whole Number.
3. Power BI will prompt to change the column—it removes the symbols and
converts it.
4. Remove any unnecessary columns, like notes or references.
5. Rename columns: Right-click Country/Territory and choose Rename, set it to
Country.
6. Click on View > Formula Bar if it’s not already visible—this way, you can
see the M code for each step.
“All of these changes are shaping steps. And just like with Excel or database
imports, Power BI logs each one in the Applied Steps pane. The cool thing is—
every time this dataset refreshes, your shaping rules will reapply automatically.”
Discussion Prompt:
“Why do you think it’s important to rename columns after importing new data?
What’s the benefit?”
Sample Answer:
“To make the data easier to understand, especially when sharing visuals with others
or using Power BI’s Q&A feature.”

🔗 Merging Data
“Alright, now that we’ve added and shaped some external data, let’s take it to the
next level—combining it with another dataset. Power BI offers two main methods:
Merging and Appending. Today, we’ll focus more on merging.”
“Merging is like doing a VLOOKUP in Excel. You join two tables together based on a
common field, and then pull in columns from one into the other.”
Scenario Example:
“Imagine you have a local Excel file that contains country codes and regional
groups. You want to merge this with the web-imported GDP data so that each
country now shows not just its GDP, but also its region. That’s where merging comes
in.”
Live Demonstration – Merge Tables
1. In Power BI Desktop, go to Home > Get Data > Excel.
2. Load a file named CountryRegions.xlsx—select the RegionLookup table and
click Transform Data.
3. Now in the Query Editor, go back to your GDP table.
4. Click Home > Merge Queries.
5. In the Merge window:
o Select Country from the GDP table.

o Select Country Name from the RegionLookup table.

o Use the Left Outer Join (default).

6. Click OK—a new column appears, showing a Table link.


7. Click the small expand icon next to that column, and choose to add only the
Region column.
8. Click OK—now each country includes its region!
“You’ve successfully merged two different sources. Notice how easy that was? But
always make sure the join keys match exactly—spelling differences or extra spaces
can break the merge.”

➕ Appending Data
“Before we wrap up, let me explain the second method: Appending. Unlike
merging columns, appending means adding rows. You use this when you have two
or more tables with the same columns—maybe from different months or regions—
and you want to stack them vertically into one big dataset.”
Quick Example:
“If you have Sales_January, Sales_February, and Sales_March—you can append
them into a single Sales_AllMonths table.”
“Go to Home > Append Queries, select the tables to combine, and Power BI will
stack them. Just watch out—if the columns don’t match exactly, you might get nulls
or mismatched data. I always recommend cleaning the structure first, then
appending.”

🧪 Demonstration Recap – Bringing It All Together


“In this demo, we’ve done something really powerful: we imported live data from
the web, shaped it using Power BI tools, merged it with a local Excel file, and
learned how to stack datasets using append if needed. These skills will come in
handy in nearly every real-world Power BI project you work on.”
Reflection Prompt (Group Discussion):
“Think about the organization or industry you want to work in—can you imagine a
case where combining data from multiple sources would be useful? How would that
help in decision-making?”
Sample Answers:
 “In healthcare, combining patient data from hospitals and lab reports.”
 “In retail, merging sales and product inventory.”
 “In marketing, combining website analytics and customer CRM data.”

🧠 Closing Remarks
“Today, you’ve taken a huge step forward as a Power BI user. Knowing how to
combine data—from external web sources, Excel files, and internal tables—is what
truly makes Power BI a business intelligence platform, not just a charting tool.”
“You now understand how to:
 Import and shape web data
 Merge multiple datasets based on a common column
 Append rows to create combined reports
 Trust and reuse your Applied Steps for future refreshes
This is how organizations connect their data, see the full picture, and make data-
driven decisions.”

📘 Practice Challenge (After Class)


“Here’s a challenge you can try before our next class:
 Find a website that has tabular data (like a Wikipedia page or government
stats).
 Import it using Get Data > Web.
 Shape and clean the dataset.
 Merge it with an existing file, like CountryRegions.xlsx.
 Create one visual—like a map or bar chart—based on the combined result.

Summary:
In today’s lesson, we explored how to combine data in Power BI by importing
information from the internet, shaping it, and merging it with other sources to
create a unified dataset. We started by pulling live data from a website using the
"Get Data > Web" option, then used the Query Editor to clean and format that data
just like we would with any local source. After shaping, we learned how to merge
two tables based on a common column, similar to using VLOOKUP in Excel, and we
also discussed how to append datasets when we want to stack data from multiple
sources into one. By the end of the session, you saw how Power BI lets us connect
and unify diverse datasets into one cohesive model for reporting.

You might also like