Step 1: Taming messy Data
- Data Cleaning in Power Query
(What is Power Query?
Power Query is a data transformation and preparation tool that is part of the
Microsoft Power BI suite. It allows users to easily extract, transform, and load
(ETL) data from a wide variety of sources into a structured format for analysis
and reporting.)
Now back to Data cleaning in Power Query:
Analysts start by importing data from multiple sources (Excel sheets, databases, APIs). Power Query helps them:
• Remove duplicates and errors
• Standardize formats (dates, currencies, text cases)
• Merge or split columns for clarity
Here are some of the most common data transformation techniques used in Power BI, along with examples:
Filtering data: This involves removing unwanted data from a dataset based
on specific criteria.
For example, you may want to filter out all sales data for a certain product category that is not relevant to your analysis.Sorting data: This involves arranging the data in a dataset in a specific order, such as by date, alphabetically, or by numerical value. For example, you may want to sort a list of customers by their total purchases.
Merging data: This involves combining data from multiple tables into one.
For example, you may have one table that contains customer information and another that contains order information. You can merge these tables to
create a single table that contains both sets of information.Splitting data: This involves dividing a single column of data into multiple columns based on a specific delimiter or pattern.
For example, you may want to split a column of customer names into separate columns for first name and last name.Grouping data: This involves aggregating data based on specific criteria, such as summing sales data by month or counting the number of orders by customer.
For example, you may want to group sales data by product category to see which categories are generating the most revenue.Calculating new columns: This involves creating new columns of data based on calculations or formulas.
For example, you may want to create a new column that calculates the profit margin for each sale.Renaming columns: This involves giving columns more descriptive names to make them easier to understand.
For example, you may want to rename a column from "col1" to "customer ID".
Step 2: Modeling with DAX
DAX stands for Data Analysis Expressions. It’s the formula language used in Power B.I, Excel Power Pivot, and SQL Server Analysis Services (SSAS) Tabular models. Think of it as the engine that powers calculations and advanced analytics inside your data models.
Data Analysis Expressions (DAX) is the language analysts use to create calculated columns, measures, and KPIs.
Key uses:
• Aggregations: SUM, AVERAGE, COUNT for quick metrics
Example: Let's say we have a table called "sales" with columns "product",
"region", and "sales_amount".
- We can use the following DAX formula to calculate the total sales amount:
Total Sale amount = Sum(Sales[Sales_amount])
This will sum up the "sales_amount" column in the "sales" table and give us the total sales amount.
- We can use the following DAX formula to calculate the Average sales amount:
= Average(Sales[price])
This will return the average price from the "price" column in the "sales" table
- We can use the following DAX formula to calculate the Count of sales:
= Count (Sales[Product])
This will return the total number of rows in the "Sales" table that have a nonblank value in the "Product" column.
• Time Intelligence: Year-to-date, month-over-month growth
• Scenario Analysis: What-if parameters for forecasting
Step 3: Building Dashboards
• Visual Storytelling: Analysts design dashboards that highlight the most important metrics with charts, maps, and KPIs.
• Interactivity: Filters, slicers, and drill-throughs let decision-makers explore data dynamically.
• Accessibility: Dashboards can be shared across teams, embedded in apps, or refreshed automatically.
Here is an Example of a Dashboard:
A Dashboard of The Kenya Crop Performance Data
Step 4: Turning Insights into Action
Decision Support: Dashboards don’t just show numbers, they guide actions.
Examples:
• Spot declining sales - adjust marketing strategy
• Identify top customers - strengthen loyalty programs
• Track inventory trends - optimize supply chainOutcome: Messy data becomes a strategic asset, enabling leaders to act quickly and confidently.
Power BI empowers analysts to bridge the gap between raw data and business strategy. It’s not just about charts, it’s about creating a feedback loop where data drives smarter decisions.

Top comments (0)