Logan's Analytics Bootcamp
Dashboard β€Ί Phase 2: Power BI
M2.3

Data Modeling and the Star Schema

⏱ 7 hoursπŸ“… Week 9❓ 4 quiz questions
Phase 2 goal

Build governed, refreshable, interactive program dashboards. Get data in shape with Power Query M, model it as a star schema, calculate it with DAX, present it well, and publish it securely.

🎯 Learning objectives

Tick each one when you can actually do it.

πŸ’‘ Key concepts

  • Facts = events and measurements (EVM by period, obligations by month, milestone records, task records). Dimensions = things you filter by (Program, Date, Contract, WBS, Appropriation, Vendor).
  • Grain: State the grain of each fact, e.g., "one row per program Γ— control account Γ— month". Mixed grain causes double counting.
  • Relationships: One-to-many, from dimension to fact. Single-direction filtering by default. Avoid bi-directional unless you know why you need it.
  • Date table: One continuous date table, marked as the Date Table, related to every fact's date column. This fixes the "timeline only filters one table" problem from Module 1.5.
  • Role-playing dates: Milestones have Baseline, Forecast, and Actual dates. Options: one active relationship plus inactive ones activated with USERELATIONSHIP in DAX, or separate date tables per role.
  • Snowflake vs. star: Flatten small lookup chains (Portfolio β†’ Program) into one dimension.
  • Hygiene: Hide foreign keys in facts, set default summarization to "Don't summarize" for IDs, sort MonthName by MonthNum, use display folders, add descriptions.

Target model for PEO-FS:

                dim_Date
                   β”‚
dim_Program ── fact_EVM ── dim_WBS
     β”‚      β•²
     β”‚       fact_Budget ── dim_Appropriation
     β”‚
     β”œβ”€β”€ fact_Milestones (BaselineDate active, ForecastDate/ActualDate inactive β†’ dim_Date)
     β”œβ”€β”€ fact_Tasks
     β”œβ”€β”€ fact_Risks
     └── dim_Contract ── (relates to fact_EVM by ContractNumber)

πŸ›  Hands-on exercise: Build the PEO-FS Star

⬇ Practice data for this module
D1 programsProgram dimension (12 rows)CSVXLSX
D2 milestonesMilestones (~150 rows)CSVXLSX
D3 evm_monthlyMonthly EVM by control account (~2,000 rows)CSVXLSX
D4 contractsContracts (30 rows)CSVXLSX
D5 budget_executionBudget execution by appropriation (1,296 rows)CSVXLSX
D6 schedule_tasksIMS task export (1,500 rows)CSVXLSX
D7 risksRisk register (80 rows)CSVXLSX

Data: all D1–D7 datasets plus dim_Date from 2.2.

  1. Create dim_Appropriation (RDT&E, Procurement, O&M) and dim_WBS (distinct ProgramID+WBS with a composite key ProgramWBSKey) in Power Query.
  2. Create relationships as in the diagram. Mark dim_Date as the date table.
  3. Relate fact_Milestones[BaselineDate] (active) and [ForecastDate], [ActualDate] (inactive) to dim_Date[Date].
  4. Hide all FK columns in fact tables. Sort MonthName by MonthNum and FYLabel by FiscalYear.
  5. Test: one matrix with dim_Program[Portfolio] and dim_Date[FYLabel] showing sums from fact_EVM and fact_Budget. Both should filter correctly.

πŸ“¦ Mini-project: Model Design Document

A 1–2 page model doc: diagram (screenshot), grain statement for each fact, relationship list (from/to, cardinality, direction, active?), and the reasoning for any inactive or bi-directional relationship. This becomes documentation for your capstone.

🧠 Self-check quiz

Answer in your own words, then check. Grade yourself honestly; your score is saved.

Q2.3.1
What is the grain of fact_EVM in PEO-FS?
Write at least a few words to unlock.
Q2.3.2
Why should filters flow from dimensions to facts and not the other way around?
Write at least a few words to unlock.
Q2.3.3
A milestone table has three date columns. How can one date table filter all three?
Write at least a few words to unlock.
Q2.3.4
Why mark a table as a Date Table?
Write at least a few words to unlock.