01.8.1Primary key and foreign key
In Customers, the Customer ID column holds a different value on each row. C001 appears only once. This column identifies each customer without any ambiguity. It is the of Customers.
In Sales, the same Customer ID column repeats. C001 appears twice, once per sale to Orvane. Here, the column points to the primary key of another table. It is a .
Likewise, “Product Code” is the primary key of Products, and a foreign key in Sales.
To do its job well, a primary key has no duplicates and no blank values. Power BI actually refuses to create a relationship whose “1” side contains duplicates. A foreign key repeats as many times as there are sales for the same customer.