#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
Module 3
4 min read

Data Modeling Fundamentals

Learn to build proper data models with relationships

What is a Data Model?

A data model defines how your tables connect to each other.

Data Model Overview

Without relationships, tables are isolated. With relationships, Power BI knows how to combine data automatically.

Star Schema

The best structure for Power BI:

Star Schema

Table TypeContainsExamples
Fact (center)Numbers, transactionsSales, Orders
Dimension (around)Descriptive dataProducts, Customers, Dates

Creating Relationships

Step 1: The Initial State

Initial State

Go to Model View - you'll see your tables but they're not connected yet.

Step 2: Drag to Connect

Drag to Connect

Click on CustomerID in one table and drag it to CustomerID in the other table.

Step 3: Relationship Created

Relationship Created

Release the mouse - Power BI creates the relationship line with 1:* symbols.

Cardinality

TypeMeaningUse
One-to-Many (1:*)One customer has many ordersMost common
One-to-One (1:1)One row matches one rowRare
Many-to-Many (:)Multiple matches both sidesAvoid

Keys

Primary Key - Unique ID in dimension table (CustomerID in Customers)

Foreign Key - Reference in fact table (CustomerID in Sales)

Best Practices

  • Use ID numbers as keys, not names
  • Keep cross-filter direction as "Single"
  • Always create a separate Date/Calendar table
  • Follow star schema pattern

Relationship Settings

Quick Setup

  1. Import your tables
  2. Go to Model View
  3. Drag matching columns to create relationships
  4. Verify with a visual in Report View

Good data modeling = good reports. Spend time getting this right!