#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
Module 3
5 min read

Data Transformation

Advanced techniques for transforming and shaping data

Text Transformations

Text Transformations

TaskHow
Uppercase/LowercaseTransform > Format > UPPERCASE
Remove spacesTransform > Format > Trim
Extract textTransform > Extract > First Characters
Replace valuesHome > Replace Values

Number Transformations

TaskHow
Round numbersTransform > Rounding > Round
Multiply/DivideTransform > Standard > Multiply
Add/SubtractTransform > Standard > Add

Date Transformations

TaskHow
Get YearTransform > Date > Year
Get MonthTransform > Date > Month
Get DayTransform > Date > Day

Conditional Column

Conditional Column

Add a column based on IF logic.

Add Column > Conditional Column

Example: Categorize sales as High/Low

  • IF Sales >= 1000 THEN "High"
  • ELSE "Low"

Custom Column

Custom Column

Write your own formula.

Add Column > Custom Column

Examples:

  • Full Name: [FirstName] & " " & [LastName]
  • Profit: [Revenue] - [Cost]
  • Year: Date.Year([OrderDate])

Unpivot Columns

Unpivot Columns

Convert wide data to long format.

Before (Wide):

ProductJanFebMar
Apple100150200

After (Long):

ProductMonthSales
AppleJan100
AppleFeb150

How: Select columns > Transform > Unpivot Columns

Merge Queries (Join Tables)

Merge Queries

Combine two tables by a matching column.

Home > Merge Queries

  1. Select first table and key column
  2. Select second table and key column
  3. Choose join type (Left, Inner, etc.)
  4. Expand the new column

Append Queries (Stack Tables)

Stack tables vertically.

Home > Append Queries

Use when you have Jan, Feb, Mar as separate tables and want one combined table.

Power Query remembers all your steps. When source data updates, transformations run automatically.

SkillsetMaster - AI, Web Development & Data Analytics Courses