PHASE 1: GETTING STARTED WITH POWER BI
PHASE 2: CONNECTING & PREPARING DATA
PHASE 3: DATA MODELING
PHASE 4: DAX (DATA ANALYSIS EXPRESSIONS)
PHASE 5: DESIGNING REPORTS & DASHBOARDS
PHASE 6: PERFORMANCE OPTIMIZATION
Power BI is a:
It converts:
Raw data → Insights → Visual dashboards
1. Power BI Desktop (Development tool)
2. Power BI Service (Cloud)
3. Power BI Mobile
For your course → mainly Power BI Desktop.
Step 1:
Step 2:
Download installer
Step 3:
Install like normal software
Step 4:
Open Power BI Desktop
Power BI has 3 main views:
🔹 Report View
Used for:
🔹 Data View
Used for:
🔹 Model View
Used for:
This is your mental flow.
Go to:
File → Options & Settings → Options
You can configure:
Important for: Date formats & locale.
(This is where real analysts are made.)
Power BI supports many data sources:
🔹 Step-by-Step: Import Excel File
Done
🔹 Import from CSV
Same process:
Home → Get Data → Text/CSV
🔹 Import from SQL Database
🔹 Import vs DirectQuery (Very Important)
Import:
DirectQuery:
After clicking "Transform Data", Power Query opens.
This is your data cleaning lab.
Power Query contains:
Everything you do is recorded in Applied Steps.
🔹 Remove Columns
Step: Right click column → Remove OR Home → Remove Columns
🔹 Change Data Type
Step: Click column header icon
Choose correct type:
Very important.
Wrong data type = wrong visuals.
🔹 Rename Column
Double click column name Type new name
Clean column names improve DAX later.
🔹 Remove Duplicates
Select column → Remove Rows → Remove Duplicates
🔹 Filter Data
Click filter icon in column header Choose values
🔹 Split Column
Example: Full Name → First Name + Last Name
Step: Select column → Split Column → By Delimiter
🔹 Merge Columns
Select two columns → Merge Columns
🔹 Create New Column (Custom Column)
Step: Add Column → Custom Column
Write formula:
Example:
[Sales] * 0.10
🔹 Replace Values
Select column → Replace Values
Used for:
🔹 Group By
Used for aggregation.
Step: Home → Group By
Choose:
🔹 Replace Nulls
Transform → Replace Values → Replace null with 0
🔹 Remove Blank Rows
Home → Remove Rows → Remove Blank Rows
Power BI provides:
Enable from:
View → Check Data Profiling options
These help detect:
Every action you perform:
Appears in Applied Steps.
Example:
You can:
This is why Power Query is powerful.
It records transformation logic.
After cleaning:
Click: Home → Close & Apply
Data now loads into Power BI model.
Data modeling means:
Without modeling:
This is core concept.
🔹 Fact Table
Contains:
Example:
Sales Table:
| Date | ProductID | Quantity | Revenue |
Fact tables contain:
Measurable data
🔹 Dimension Table
Contains:
Example:
Product Table:
| ProductID | ProductName | Category |
Dimension tables describe facts.
Easy Memory Trick:
In professional BI modeling, we use:
Star Schema
Structure:
Advantages:
Similar to star schema
But dimension tables are normalized.
More complex.
Used rarely in Power BI unless required.
Now practical.
🔹 Step 1:
Go to Model View
🔹 Step 2:
Drag common column
From one table
To another table
Example:
ProductID (Sales table) → ProductID (Product table)
🔹 Step 3:
Check relationship settings:
There are 3 types:
🔹 One-to-Many (1:*)
Most common.
Example:
Correct modeling in most cases.
🔹 Many-to-One (*:1)
Reverse direction.
🔹 Many-to-Many (*:*)
Danger zone
Use carefully.
Can cause incorrect totals.
Two options:
Best practice:
Use Single unless necessary.
Both can create ambiguity.
Used for drill-down.
Example:
Date hierarchy:
Year → Quarter → Month → Day
How to Create:
Now visual supports drill-down.
Always create proper date table.
Why?
Time intelligence functions require:
Step-by-Step:
Now time-based calculations work properly.
Filters flow from:
Dimension → Fact
Example:
If you filter Product Category
Sales values update.
But filtering fact table
Does NOT filter dimension automatically.
Understand this carefully.
DAX = Data Analysis Expressions
It is a formula language used to:
Think of it as:
Excel formulas + SQL logic + filter context intelligence.
This is the most common confusion.
🔹 Calculated Column
Example:
If Sales table has Quantity and Price:
You create:
Revenue = Quantity * Price
This is calculated for every row.
Step-by-Step: Create Calculated Column
Revenue = Sales[Quantity] * Sales[Price]
Press Enter.
Column created.
🔹 Measure
Example:
Total Revenue:
Total Revenue = SUM(Sales[Revenue])
Measure recalculates based on:
Step-by-Step: Create Measure
Press Enter.
Memory Trick:
🔹 SUM
Total Sales = SUM(Sales[Revenue])
🔹 AVERAGE
Avg Sales = AVERAGE(Sales[Revenue])
🔹 COUNT
Total Orders = COUNT(Sales[OrderID])
🔹 DISTINCTCOUNT
Unique Customers = DISTINCTCOUNT(Sales[CustomerID])
This is the heart of DAX.
CALCULATE modifies filter context.
Example:
Total Sales = SUM(Sales[Revenue])
Sales 2023 = CALCULATE(
[Total Sales],
Sales[Year] = 2023
)This changes filter to Year 2023.
Used inside CALCULATE for advanced filtering.
Example:
High Sales = CALCULATE(
[Total Sales],
FILTER(Sales, Sales[Revenue] > 1000)
)🔹 Row Context
Exists in:
It evaluates row by row.
🔹 Filter Context
Exists in:
Most DAX confusion happens here.
These functions iterate row by row.
Example:
🔹 SUMX
Total Revenue = SUMX(
Sales,
Sales[Quantity] * Sales[Price]
)Difference:
Requires proper date table.
🔹 TOTALYTD
YTD Sales = TOTALYTD(
[Total Sales],
'Date'[Date]
)🔹 SAMEPERIODLASTYEAR
Last Year Sales = CALCULATE(
[Total Sales],
SAMEPERIODLASTYEAR('Date'[Date])
)Used for:
Example:
Profit Status =
IF(
[Total Sales] > 10000,
"Good",
"Needs Improvement"
)Cleaner than multiple IFs.
Category Label =
SWITCH(
TRUE(),
[Total Sales] > 20000, "Excellent",
[Total Sales] > 10000, "Good",
"Low"
)This phase is about:
Power BI is not about showing data.
It is about guiding decisions.
When you open Report View:
You see:
Let's create a simple chart.
🔹 Create a Bar Chart
Chart created
🔹 Create a Line Chart
Used for time trend analysis.
🔹 Create a Pie Chart
Use carefully. Too many slices = bad design.
Card visual shows:
Single important metric.
Example:
Step-by-Step:
Simple and powerful.
Slicers allow user to filter dashboard.
🔹 Create a Slicer
Now user can select year dynamically.
🔹 Types of Slicers
Used for hierarchy navigation.
Example:
Year → Quarter → Month
Step-by-Step:
User can click to drill into data.
Used to highlight important values.
🔹 Apply Conditional Formatting
Example:
Power BI supports:
Step-by-Step:
Used for geographical analysis.
Now design principles (very important):
🔹 Keep It Clean
🔹 Use Consistent Color Theme
Go to:
View → Themes
Choose professional theme.
🔹 Align Properly
Use grid alignment tools.
🔹 Use Titles
Each visual should answer a question.
Example:
"Sales by Region – 2023"
Not:
"Chart 1"
Report:
Dashboard:
After completing report:
Report uploaded to cloud.
Imagine:
If not optimized:
Optimization = speed + efficiency.
Power BI provides built-in performance tool.
🔹 How to Use Performance Analyzer
It shows:
Now you know what is slow.
Model design affects speed more than visuals.
🔹 Use Star Schema
Avoid:
Star schema = faster.
🔹 Remove Unnecessary Columns
Every column consumes memory.
In Power Query:
Remove unused columns before loading.
🔹 Avoid Many-to-Many Relationships
These slow down filter propagation.
Prefer: 1-to-many relationships.
Bad DAX = slow report.
🔹 Avoid Complex Nested CALCULATE
Keep measures simple and reusable.
Create base measures:
Total Sales = SUM(Sales[Revenue])
Then build advanced measures on top of it.
🔹 Use Variables (VAR)
Improves readability and performance.
Example:
Profit Margin = VAR Revenue = [Total Sales] VAR Cost = SUM(Sales[Cost]) RETURN Revenue - Cost
Cleaner and faster.
🔹 Avoid Using Calculated Columns When Not Needed
Measures are better than calculated columns in most cases.
Calculated columns increase model size.
Too many visuals on one page = slow.
Best practice:
For very large datasets:
Use summarized tables instead of raw data.
Example:
Aggregate daily data instead of minute-level.
Power BI auto-creates hidden date tables.
Turn off for better control:
File → Options → Data Load → Disable Auto Date/Time.
Too many slicers slow down report.
Use:
Import Mode:
DirectQuery: