0% found this document useful (0 votes)
15 views3 pages

Lab 2 Data Transformation in PBI

This document outlines Lab 2 of the Business AI Lab, focusing on connecting and shaping data in Power BI. It details prerequisites, objectives, and step-by-step instructions for data profiling, text transformation, numerical analysis, date and time tools, and creating index and conditional columns using various AdventureWorks data files. The lab aims to enhance skills in data importation and transformation within Power BI.

Uploaded by

nhitb312.nevents
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Lab 2 Data Transformation in PBI

This document outlines Lab 2 of the Business AI Lab, focusing on connecting and shaping data in Power BI. It details prerequisites, objectives, and step-by-step instructions for data profiling, text transformation, numerical analysis, date and time tools, and creating index and conditional columns using various AdventureWorks data files. The lab aims to enhance skills in data importation and transformation within Power BI.

Uploaded by

nhitb312.nevents
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab 2: Connecting and Shaping Data in Power BI

Dr Huan Vu

Business AI Lab

Faculty of Data Science and Artificial Intelligence


College of Technology
National Economics University, Vietnam
Email: huanv@neu.edu.vn

1
Faculty of Data Science and Artificial Intelligence, NEU

Prerequisites
You should pick up where you left off last time on the Adventure Works project. Reminder, we have:
• Created a .pbix file named AdventureWorks.pbix.
• Loaded data from the AdventureWorks Territory Lookup.csv file, and renamed the Query
Territory Lookup.
• Loaded data from the AdventureWorks Product Categories Lookup.csv file, and renamed
the Query Product Categories Lookup.
• Loaded data from the AdventureWorks Product Subcategories Lookup.csv file, and re-
named the Query Product Subcategories Lookup.
• Loaded data from the AdventureWorks Product Lookup.csv file, and renamed the Query
Product Lookup.
• Changed the type of the columns ProductCost and ProductPrice from Decimal number to
Fixed decimal number.
• Created a new SKUType column, using the ProductSKU column, by extracting all characters
before the second dash (”-”).
• Replaced all values ”0” in the ProductStyle column with ”NA”.

Objectives
The objective of this Lab is to complete importing other data files of the AdventureWorks project and
transform the data if necessary.

1 Data Profiling and Data QA


1.1 Introduction
Profiling tools like column quality, column distribution, and column profile allow you to explore
the quality, composition, and distribution of your data before loading it into the Power BI front-end.

1.2 Instructions
1. Import the AdventureWorks Customer Lookup.csv file to the existing PowerBI project. Make
sure that the type of columns is detected correctly.
2. Use Column quality tool to check for errors or empty values. Check the rows that contain these
errors and remove them if needed.
3. User Column distribution tool to view the distribution of values in each column.
4. User Column profile tool to view the column statistics.

2 Text Specific Tools


1. Transform the Prefix, FirstName, LastName columns from CAPITALIZED format to ”Capi-
talized Each Word” format.
2. Create a column named FullName by merging the Prefix, FirstName, LastName columns,
separated using a single space.
3. Create a new column named DomainName from the EmailAddress column by removing all
text/characters except for the domain name. Use transformation steps to clean up and capitalize
the domain names. For example, if the email address of the customer is ”jon24@adventure-
works.com”, the domain name should be ”Adventure Works”.

@BAI Lab 2
Faculty of Data Science and Artificial Intelligence, NEU

3 Numerical Tools
1. Create a new column name ”DiscountedPrice”. The value of this column is 0.9× the Product-
Price.
2. Find the following values without storing it anywhere in our data model:

• What is our average product cost?


• How many colors do we sell our products in?
• How many distinct customers do we have?
• What is the maximum annual customer income?

4 Date & Time Tools


1. Import the AdventureWorks Calendar Lookup.csv file and name the Query Calendar Lookup
and verify the columns.
2. Add some new columns: Name of day, Start of Week, Start of Month, Start of Quarter.

3. The Start of Week column starts on Sunday, transform the column so that the week starts on
Monday.
4. Add the following columns: MonthName (e.g. January), MonthNumber (e.g. ”1”), Start of
Year (e.g. ”1/1/2020”), and Year (e.g. ”2020”).

5 Index and Conditional Columns


1. Import the AdventureWorks Sales Data 2022.csv file and name the Query Sales Data 2022
and verify the columns.

2. Insert an Index column to the Sales Data 2022 table.


3. Create a Conditional column and name it QuantityType. The QuantityType is Single Item
if the order quantity is 1. If the order quantity is more than 1, the QuantityType is Multiple
Items. For other order quantity, use Others.

@BAI Lab 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy