By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
(For real projects, PL-300 exam prep, and production troubleshooting)
You’re building a Power BI report for a retail client. Sales data is in one table, products in another, and stores in a third. If you just dump everything into a single flat table, your report will: - Crash when filtering large datasets.- Lie to users (e.g., showing duplicate sales because of incorrect joins).- Be slow (DAX measures will take 30+ seconds to calculate).
A star schema fixes this by organizing data into fact tables (transactions) and dimension tables (descriptive attributes). Relationship cardinality (1-to-many, many-to-many) determines how these tables connect—and if you get it wrong, your entire model breaks.
Real-world scenario:You inherit a Power BI report where sales data is duplicated when filtering by product category. The root cause? A many-to-many relationship was used where a 1-to-many was needed. Fixing this reduces report load time from 45 seconds to 2 seconds and eliminates incorrect aggregations.
Sales[SaleID]
Sales[ProductID]
Sales[Amount]
Products[ProductID]
Products[Name]
Products[Category]
ProductStore[ProductID]
ProductStore[StoreID]
USERELATIONSHIP()
OrderDate
ShipDate
Dates
We’ll model: - Fact table: Sales (transactions) - Dimension tables: Products, Stores, Dates
Sales
Products
Stores
Sales.csv
Products.csv
Stores.csv
Dates.csv
CustomerName
Amount
Example: powerquery = Table.SelectColumns(Sales, {"SaleID", "ProductID", "StoreID", "DateID", "Amount"})
powerquery = Table.SelectColumns(Sales, {"SaleID", "ProductID", "StoreID", "DateID", "Amount"})
Dimension tables (Products, Stores, Dates):
powerquery = Table.Distinct(Products, {"ProductID"})
Sales[StoreID]
Stores[StoreID]
Sales[DateID]
Dates[DateID]
⚠️ Critical: - Ensure the "1" side is the dimension table (e.g., Products). - If Power BI gets it wrong, right-click the relationship > Properties > Cardinality.
Stores[Region]
Scenario: A product can be in multiple promotions, and a promotion can apply to multiple products.
ProductPromotion
csv ProductID,PromotionID 1,101 1,102 2,101
Promotions.csv
ProductPromotion[ProductID]
Promotions[PromotionID]
ProductPromotion[PromotionID]
dax SalesWithPromo = CALCULATE( SUM(Sales[Amount]), USERELATIONSHIP(Sales[ProductID], ProductPromotion[ProductID]) )
Sales_Products_1toMany
SAMEPERIODLASTYEAR
Answer: 90% of the time, 1-to-many.
"Why is your report slow?"
Answer: "The model isn’t a star schema" or "Bidirectional filtering is enabled."
"How do you handle a product that belongs to multiple categories?"
Categories
You have: - A Sales table with SaleID, ProductID, StoreID, Amount.- A Products table with ProductID, Name, Category.- A Stores table with StoreID, Name, Region.
SaleID
ProductID
StoreID
Name
Category
Region
Problem: When you filter by Stores[Region], sales for all products disappear.
Why? The relationship between Sales and Stores is many-to-many (incorrect).
Why it works: Stores[StoreID] is unique (1), so it should filter Sales[StoreID] (many).
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.