Primary & Secondary Keys In Power Bi.

Published: (February 10, 2026 at 04:31 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

Cover image for Primary & Secondary Keys In Power Bi.

Understanding Primary and Foreign Keys in Power BI

When keys are mentioned in a Power BI context, it’s helpful to differentiate between primary keys and foreign (secondary) keys:

  • Primary Key – a unique identifier for a record, similar to a nametag.
  • Foreign Key – a pointer to another table that indicates which primary key it relates to.

Power BI is a data‑modeling tool that works with structured data presented in a tabular format (rows and columns).

What Is Tabular Format?

Tabular data is organized into tables with rows (records) and columns (fields). This structure allows Power BI to model relationships between tables efficiently.

Fact Tables

Fact tables contain foreign keys (also called secondary keys). These keys form the backbone of the fact table and connect it to dimension tables.

Dimension Tables

A dimension table describes entities such as customers, products, or dates. The primary key in a dimension table acts like a unique ID card for each row, uniquely identifying each item.

Diagram showing primary and foreign keys in fact and dimension tables.


Hope you find this helpful.

0 views
Back to Blog

Related posts

Read more »

Entity–Attribute–Value (EAV) Model

The Entity–Attribute–Value EAV model is a database design pattern that lets you define entity attributes at runtime. It’s especially useful when: - Different re...