Practice Project 11

Power BI Interactive Business Dashboard

Import business records into Power BI Desktop, model relationships using a star schema, write custom DAX time-intelligence metrics, and design interactive BI dashboards.

Domain / Environment
Business Intelligence / Windows Host
Difficulty
Intermediate (3/5)
Course Module
BI with Power BI
Deliverables
Power BI Workbook (.pbix) & Dashboard Layout
1. System Architecture & Relational Model

The diagram below displays the Power BI data model. It uses a star schema model, linking dimension tables (Customers and Calendar) to a central transaction fact table (Sales) using one-to-many (1:*) relationships.

Dim_Customers CustomerKey (PK) Name Country 1 * Fact_Sales SalesKey (PK) CustomerKey (FK) OrderDateKey (FK) Quantity UnitPrice DAX Measures 1 * Dim_Calendar DateKey (PK) Year / Month Quarter
2. Part 1: Step-by-Step Action Items & Key GUI Execution Steps
STEP 1

Load CSV Datasets into Power BI

Open Power BI Desktop on your Windows host and load the dimension and fact tables.

Click Home tab in ribbon -> Click "Get Data" icon -> Select "Text/CSV" -> Select customer_records.csv -> Click "Transform Data" to open Power Query
This loads data tables into Power Query for transformation. Repeat these steps for `sales_facts.csv` and `calendar_dim.csv`.
STEP 2

Transform Data Columns in Power Query

Clean table columns and set data types in Power Query Editor.

Select sales_facts table on left -> Right-click CustomerKey column header -> Click "Change Type" -> Select "Whole Number" -> Click "Close & Apply" in top-left Home tab
Setting numeric data types enables database key joins and fast row lookups.
STEP 3

Model Star Schema Relationships

Define table relationships using the Model View dashboard layout.

Click "Model View" icon (third icon on far-left vertical sidebar) -> Drag CustomerKey from Dim_Customers -> Drop onto CustomerKey column inside Fact_Sales
This creates a one-to-many (1:*) relationship, linking customer profiles to transaction rows. Drag `DateKey` to `OrderDateKey` to link the calendar table.
STEP 4

Create Custom DAX Measures

Author KPI calculations in the Report View dashboard.

Click "Report View" icon (first icon on vertical sidebar) -> Click Fact_Sales table on right -> Click "New Measure" in Table Tools ribbon -> Paste DAX code from Part 2
This compiles DAX formulas, adding key metrics (like Total Revenue and YoY growth) to your data model.
STEP 5

Build Interactive UI Visuals

Construct visual dashboard elements (KPI cards, trends, and charts) to display metrics.

Click "Card" icon in Visualizations panel -> Drag Total Revenue measure to Fields -> Resize card to 1.5 inches height -> Place in top header area
This adds a KPI card for total revenue to the dashboard page. Add a Line Chart (Revenue by Year/Month) and a Bar Chart (Revenue by Country) to complete the layout.
3. Dashboard Visual Layout (Wireframe Design)

The visual layout below displays the target dashboard structure. Slicers sit in the left sidebar, KPI cards align along the top header, and line/bar charts occupy the main dashboard area.

Executive Sales & Revenue Performance Dashboard Filters & Slicers Select Year 2024 Total Revenue $1,245,600 YoY Revenue Growth +14.25% Total Orders 14,250 Monthly Revenue Trend Sales by Country US UK DE
4. Part 2: Complete Deliverable Assets & Production Templates

To build the dashboard, we need the raw sales dataset files and the DAX formulas. Below is an explanation of the DAX formulas, followed by the sample CSV datasets.

DAX Code Formulation

Measure 1

Total Revenue Calculation

Calculates total sales by multiplying unit price by quantity sold across all transactions.

Total Revenue = SUMX(Fact_Sales, Fact_Sales[Quantity] * Fact_Sales[UnitPrice])
This uses `SUMX` to calculate sales row-by-row and sum the results.
Measure 2

Prior Year Revenue (Time Intelligence)

Calculates revenue for the same period in the previous year to enable year-over-year comparisons.

Prior Year Revenue = CALCULATE([Total Revenue], SAMEPERIODLASTYEAR(Dim_Calendar[Date]))
This shifts the date context back by one year using `SAMEPERIODLASTYEAR` to calculate prior year sales.
Measure 3

YoY Revenue Growth

Calculates the percentage change in revenue compared to the previous year.

YoY Revenue Growth = DIVIDE([Total Revenue] - [Prior Year Revenue], [Prior Year Revenue], 0)
This uses `DIVIDE` to calculate year-over-year growth, return 0 if the denominator is null, and formats the result as a percentage.

Production templates

1. Customers Dimension (Save as customer_records.csv):

CustomerKey,Name,Country,Segment 101,John Doe,US,Enterprise 102,Jane Smith,UK,SMB 103,Hans Miller,DE,SMB 104,Alice Brown,US,Enterprise 105,Bob Green,UK,SMB

2. Sales Facts Table (Save as sales_facts.csv):

SalesKey,CustomerKey,OrderDateKey,Quantity,UnitPrice 1,101,20240101,5,150.00 2,102,20240115,2,45.00 3,103,20240201,1,300.00 4,101,20240215,10,120.00 5,104,20240301,3,500.00 6,105,20250101,4,200.00 7,101,20250115,8,150.00 8,102,20250201,3,45.00 9,103,20250215,2,300.00 10,104,20250301,5,500.00

3. Calendar Dimension (Save as calendar_dim.csv):

DateKey,Date,Year,Month,Quarter 20240101,2024-01-01,2024,January,Q1 20240115,2024-01-15,2024,January,Q1 20240201,2024-02-01,2024,February,Q1 20240215,2024-02-15,2024,February,Q1 20240301,2024-03-01,2024,March,Q1 20250101,2025-01-01,2025,January,Q1 20250115,2025-01-15,2025,January,Q1 20250201,2025-02-01,2025,February,Q1 20250215,2025-02-15,2025,February,Q1 20250301,2025-03-01,2025,March,Q1
5. Deliverables Summary

Verify that the following configurations and outputs exist inside your project workspace.

Created Files / Templates

  • ~/Projects/powerbi_dashboard/sales_dashboard.pbix - Power BI Workbook file.
  • ~/Projects/powerbi_dashboard/customer_records.csv - Customers dimension data.
  • ~/Projects/powerbi_dashboard/sales_facts.csv - Sales transactions fact data.

Verification Artifacts / Execution Proof

  • Star Schema relationships active in the Model View tab.
  • Three DAX measures returning correct revenue calculations.
  • Interactive visuals updating correctly when slicer years are changed.
6. Closing Explanation: Why We Did This & What It Accomplishes

Architectural Intent & Operational Impact

Why We Did This

What This Accomplishes