What is Power BI?
Power BI is Microsoft's business intelligence platform that transforms raw data into interactive dashboards and reports.
Why Power BI?
The Problem It Solves:
- Excel tables are static and hard to update
- Stakeholders ask the same questions repeatedly ("What were last month's sales?")
- Creating charts manually for every request takes hours
- Data lives in multiple places (Excel, SQL databases, cloud services)
The Power BI Solution:
- Connect to multiple data sources (Excel, SQL, Google Sheets, APIs)
- Transform data once, refresh with one click
- Create interactive dashboards (click to filter, drill down, explore)
- Share with stakeholders (web, mobile, embedded in apps)
- Automatic refresh (dashboard updates daily/hourly without manual work)
Real Example: Swiggy Order Dashboard
Before Power BI:
- Order data exported from database to Excel weekly
- Analyst creates pivot tables and charts manually
- Emails static PDF to managers
- Managers reply: "Can you also show this by city?" → Start over
After Power BI:
- Database connected to Power BI (auto-refresh daily)
- Interactive dashboard with filters (date, city, restaurant)
- Managers self-serve: Click city → See city-specific metrics
- Analyst saves 5 hours/week, stakeholders get instant answers
Power BI Ecosystem
Power BI Desktop (Windows app) — Where you build reports
- Connect to data sources
- Transform data (clean, merge, create calculations)
- Create visualizations
- Design dashboard layouts
Power BI Service (Web app) — Where you share and collaborate
- Publish reports from Desktop
- Share with team members
- Set up automatic data refresh
- View on web or mobile
Power BI Mobile (iOS/Android) — Dashboards on the go
- View reports on phone/tablet
- Receive data alerts
- Touch-optimized interactions
Power BI Desktop is like Microsoft Word (where you create documents). Power BI Service is like OneDrive (where you share them). You build in Desktop, publish to Service, stakeholders access via web or mobile. Two-step workflow: Build → Share.
Step 1 — Install Power BI Desktop
Download and Install
Power BI Desktop is FREE (no credit card, no trial limitations).
- Download: Go to https://powerbi.microsoft.com/desktop
- Install: Run the installer (requires Windows 10 or later)
- Launch: Open Power BI Desktop from Start menu
System Requirements:
- Windows 10 or 11 (Power BI Desktop is Windows-only)
- 4 GB RAM minimum (8 GB recommended)
- 2 GB disk space
Mac Users: Use Parallels Desktop or Boot Camp to run Windows, or use Power BI Service (web version, limited features)
Interface Overview
When you open Power BI Desktop, you'll see:
┌─────────────────────────────────────────────────────────────┐
│ [Home] [Insert] [Modeling] [View] [Help] ← Ribbon Menu │
├─────────────────────────────────────────────────────────────┤
│ │
│ 📊 Canvas 🗂️ Fields Pane │
│ (Where you add visuals) (Your data columns) │
│ │
│ 🎨 Visualizations Pane │
│ (Chart types) │
│ │
│ 🔍 Filters Pane │
│ (Filter data) │
└─────────────────────────────────────────────────────────────┘
Key Areas:
- Ribbon Menu (top) — Main commands (Get Data, Transform, Publish)
- Canvas (center) — Your dashboard workspace (add charts here)
- Fields Pane (right) — List of your data tables and columns
- Visualizations Pane (right) — Chart types and formatting options
- Filters Pane (right) — Apply filters to visuals or entire page
Get Sample Data
For this tutorial, we'll use sample sales data:
Option 1: Use Power BI's Built-in Sample
- Click Home → Get Data → Sample Reports
- Select Financial Sample → Load
- You now have a dataset to practice with
Option 2: Download CSV (more realistic for learning)
- Download this sample dataset: Flipkart Sales Data (CSV)
- Save to your computer (e.g.,
Desktop/sales.csv) - We'll load this in the next step
Step 2 — Connect to Data
Power BI connects to 100+ data sources. Let's start with CSV (the most common for beginners).
Load CSV File
- Click Home → Get Data → Text/CSV
- Navigate to your
sales.csvfile → Open - Preview window opens showing first 200 rows
- Check data looks correct (columns make sense, values look right)
- Click one of these buttons:
- Load — Import data as-is (quick start)
- Transform Data — Clean/modify data first (recommended)
For this tutorial, click Transform Data. This opens Power Query Editor.
Power Query Editor — Transform Data
Power Query is where you clean and shape data BEFORE visualizing.
Common Transformations:
1. Remove Unnecessary Columns
- Right-click column header → Remove (delete columns you don't need)
- Example: Remove "Internal_ID", "Legacy_Code" (technical fields not used in reports)
2. Change Data Types
- Power BI auto-detects types (sometimes wrong)
- Click column header → Data Type dropdown
- Common types: Text, Whole Number, Decimal Number, Date, Currency
Example: Order_Date showing as text? Change to Date.
3. Filter Rows
- Click dropdown arrow on column header
- Uncheck values to exclude
- Example: Filter out "Cancelled" orders (only show "Delivered")
4. Replace Values
- Right-click column → Replace Values
- Example: Replace "N/A" with blank, or standardize city names ("Mumbia" → "Mumbai")
5. Create Calculated Columns
- Add Column tab → Custom Column
- Example: Create "Profit" =
[Revenue] - [Cost]
Example: Clean Sales Data
Let's clean the Flipkart sales dataset:
Step 1: Remove columns we don't need
- Right-click "Internal_Reference_ID" → Remove
- Right-click "Last_Modified_By" → Remove
Step 2: Fix data types
- Click "Order_Date" → Data Type: Date
- Click "Revenue" → Data Type: Currency (₹)
- Click "Quantity" → Data Type: Whole Number
Step 3: Filter out cancelled orders
- Click dropdown on "Order_Status" column
- Uncheck "Cancelled" → OK
- Now dataset only includes completed orders
Step 4: Create Profit column
- Add Column → Custom Column
- Name: Profit
- Formula: [Revenue] - [Cost]
- Click OK
Step 5: Load to Power BI
- Click "Close & Apply" (top-left)
- Data now appears in Fields Pane
What Just Happened?
- You created a transformation script (applied every time data refreshes)
- Original CSV file unchanged (transformations are in Power BI, not source)
- Click "Transform Data" anytime to edit your cleaning steps
Pro Tip: Power Query saves every step. See them in "Applied Steps" pane (right side). Click any step to see data at that point. Delete a step to undo it. This is MUCH better than manually cleaning data in Excel (repeatable, auditable, reversible).
⚠️ CheckpointQuiz error: Missing or invalid options array
Step 3 — Create Visualizations
Now that data is clean, let's build charts.
Create Your First Visual
Example: Revenue by Product Category (Bar Chart)
- Click blank area on canvas (deselect any selected visual)
- In Visualizations pane, click Stacked Bar Chart icon
- Empty visual appears on canvas
- From Fields pane, drag:
Category→ Y-axis well (rows)Revenue→ X-axis well (bars)
- Chart appears! Bars show revenue per category
Resize and Move:
- Click visual → Drag corner handles to resize
- Click visual → Drag to move
- Snap to grid (align with other visuals)
Common Chart Types
Bar Chart / Column Chart — Compare categories
Use for: Revenue by Product, Orders by City, Sales by Month
Fields: Category → Axis, Metric → Values
Line Chart — Show trends over time
Use for: Daily Revenue Trend, Monthly Active Users
Fields: Date → Axis, Metric → Values
Pie Chart / Donut Chart — Show composition (use sparingly)
Use for: Market Share (3 slices max), Revenue Mix
Fields: Category → Legend, Metric → Values
Card — Show single KPI number
Use for: Total Revenue, Average Rating, Order Count
Fields: Metric → Fields
Table / Matrix — Show detailed data
Use for: Top 10 Products, Sales by Region & Category
Fields: Dimensions → Rows/Columns, Metrics → Values
Map — Show geographic data
Use for: Sales by State, Store Locations
Fields: Location → Location, Metric → Size
Build a Multi-Visual Dashboard
Let's create a typical sales dashboard with 5 visuals:
Visual 1: Total Revenue (Card)
- Visualizations → Card
- Fields → Drag
Revenueto Fields well - Card shows sum of all revenue (e.g., ₹45.2M)
- Resize: Small (top-left corner)
Visual 2: Revenue Trend (Line Chart)
- Visualizations → Line Chart
- Fields → Drag
Order_Dateto X-axis,Revenueto Y-axis - Line shows daily revenue over time
- Resize: Wide (top-center, takes up 2/3 of top row)
Visual 3: Orders by City (Bar Chart)
- Visualizations → Stacked Bar Chart
- Fields → Drag
Cityto Y-axis,Order_ID(count) to X-axis - Bars show order volume per city
- Sort: Click "More options" (…) → Sort descending
- Resize: Left column (middle height)
Visual 4: Revenue by Category (Pie Chart)
- Visualizations → Pie Chart
- Fields → Drag
Categoryto Legend,Revenueto Values - Pie shows revenue share by category
- Resize: Right column (middle height)
Visual 5: Top 10 Products (Table)
- Visualizations → Table
- Fields → Drag
Product_Name,Revenue,Quantityto Values - Table shows product details
- Sort: Click
Revenuecolumn header → Sort descending - Filter to Top 10: Filters pane → Add filter on this visual →
Product_Name→ Filter type: Top N → Show items: Top 10 by Revenue - Resize: Bottom row (full width)
Your dashboard now has:
- KPI card (total revenue)
- Trend line (revenue over time)
- Two comparison charts (city, category)
- Detailed table (top products)
Step 4 — Add Interactivity and Filters
Power BI's magic is cross-filtering: Click one visual, others update automatically.
Test Cross-Filtering
Try this:
- Click a bar in "Revenue by Category" (e.g., Electronics)
- Watch: All other visuals filter to show ONLY Electronics
- Line chart → Electronics revenue trend
- City bar chart → Cities' Electronics orders
- Product table → Top Electronics products
- Click bar again to deselect (back to all data)
This is the power of Power BI: Stakeholders explore data themselves instead of requesting custom reports.
Add Slicers (Filters)
Slicers are visual filters — add them to your dashboard:
Date Range Slicer:
- Click blank area on canvas
- Visualizations → Slicer icon
- Fields → Drag
Order_Dateto Field well - Slicer appears with date range slider
- Resize and place at top of dashboard
- Users can now: Drag slider to filter dashboard to specific date range
City Dropdown Slicer:
- Visualizations → Slicer
- Fields → Drag
Cityto Field well - Change style: Click slicer → Format pane → Slicer settings → Style: Dropdown (instead of list)
- Users can now: Select city from dropdown to filter dashboard
Category Multi-Select Slicer:
- Visualizations → Slicer
- Fields → Drag
Categoryto Field well - Enable multi-select: Format pane → Selection → Multi-select with Ctrl: On
- Users can now: Ctrl+Click to select multiple categories
Page-Level Filters
Filters that apply to entire page (all visuals):
- Click blank area (deselect all visuals)
- Filters pane → Filters on this page section
- Drag field (e.g.,
Order_Status) to this section - Set filter: Select "Delivered" (exclude Cancelled orders from entire page)
When to use slicers vs filters:
- Slicers → Visible on dashboard (users control)
- Page filters → Hidden background filters (analyst control)
Drill-Down Hierarchies
Create hierarchies for drill-down (e.g., Year → Quarter → Month):
- Fields pane → Right-click
Order_Date→ New hierarchy - Power BI auto-creates: Year, Quarter, Month, Day
- In visual: Drag
Order_Date Hierarchyto axis (instead of flat date) - Click drill-down arrows on visual:
- ⬇️ Drill down one level (Year → Quarter)
- ⬆️ Drill up (Quarter → Year)
- ⤵️ Expand all levels (show Year + Quarter together)
Use case: Executive sees yearly trend, clicks drill-down to see quarterly breakdown, clicks again for monthly detail.
Power Move: Create a Date table with DAX (Data Analysis Expressions) for advanced time intelligence (YoY growth, MTD, YTD). We'll cover this in the Power BI Sales Dashboard project tutorial.
Step 5 — Basic DAX Measures
DAX (Data Analysis Expressions) is Power BI's formula language — like Excel formulas but more powerful.
Calculated Columns vs Measures
Calculated Column: Row-level calculation (like Excel column formula)
- Created in Data view → Add Column
- Computes once when data loads
- Example:
Profit = [Revenue] - [Cost](per row) - Use for: Creating new dimensions (categories, flags)
Measure: Aggregated calculation (like Excel pivot table formula)
- Created in Report view → Right-click table → New Measure
- Computes dynamically based on filters
- Example:
Total Revenue = SUM(Sales[Revenue]) - Use for: KPIs, aggregations, ratios
Rule of thumb: If it's per-row, use column. If it's a summary stat, use measure.
Create Your First Measure
Total Revenue Measure:
Total Revenue = SUM(Sales[Revenue])How to create:
- Fields pane → Right-click
Salestable → New Measure - Formula bar (top) → Type:
Total Revenue = SUM(Sales[Revenue]) - Press Enter
- Measure appears in Fields pane (with calculator icon)
- Use it: Drag to Card visual or Table
Essential DAX Formulas
1. Count Distinct (e.g., Unique Customers)
Total Customers = DISTINCTCOUNT(Sales[Customer_ID])2. Average
Average Order Value = AVERAGE(Sales[Revenue])3. Conditional Calculation (e.g., High-Value Orders)
High Value Orders = CALCULATE(
COUNTROWS(Sales),
Sales[Revenue] > 5000
)CALCULATEchanges filter context- Counts rows WHERE Revenue > 5000
4. Percentage of Total
Revenue % of Total =
DIVIDE(
SUM(Sales[Revenue]),
CALCULATE(SUM(Sales[Revenue]), ALL(Sales[Category]))
)ALLremoves filters (gives grand total)DIVIDEhandles division (safe from divide-by-zero)
5. Year-over-Year Growth
Revenue YoY Growth =
VAR CurrentYearRevenue = SUM(Sales[Revenue])
VAR PreviousYearRevenue =
CALCULATE(
SUM(Sales[Revenue]),
SAMEPERIODLASTYEAR(Calendar[Date])
)
RETURN
DIVIDE(CurrentYearRevenue - PreviousYearRevenue, PreviousYearRevenue)VARstores intermediate calculationsSAMEPERIODLASTYEARgets same date range, previous year- Returns growth rate (e.g., 0.15 = 15% growth)
Format Measures
After creating measure, format it:
- Click measure in Fields pane
- Measure Tools ribbon appears
- Format dropdown → Choose:
- Currency: ₹ (Indian Rupee)
- Percentage: % (auto-multiplies by 100)
- Whole Number: No decimals
- Decimal places → Set to 0, 1, or 2
Example: Format "Total Revenue" as Currency (₹) with 2 decimals → Shows as ₹45.23M instead of 45234567.89
⚠️ FinalQuiz error: Missing or invalid questions array
⚠️ SummarySection error: Missing or invalid items array
Received: {"hasItems":false,"isArray":false}