0
0
Power BIbi_tool~20 mins

Relationships (one-to-many, many-to-many) in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Relationship Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding One-to-Many Relationships

In Power BI, you have two tables: Customers and Orders. Each customer can have multiple orders, but each order belongs to only one customer.

What type of relationship should you create between these tables?

AOne-to-one between Customers and Orders
BOne-to-many from Customers to Orders
CMany-to-many between Customers and Orders
DMany-to-one from Customers to Orders
Attempts:
2 left
💡 Hint

Think about how many orders one customer can have.

dax_lod_result
intermediate
2:00remaining
DAX Measure with Many-to-Many Relationship

You have two tables: Products and Sales. Products can appear in multiple sales, and sales can include multiple products through a bridge table SalesProducts. This is a many-to-many relationship.

Given this DAX measure, what is the total sales amount for ProductID 101?

SalesAmountForProduct101 = CALCULATE(SUM(Sales[Amount]), FILTER(Products, Products[ProductID] = 101))
AAn error due to ambiguous relationship
BThe sum of Sales[Amount] for all sales, ignoring ProductID filter
CZero, because the filter on Products does not propagate through many-to-many
DThe sum of Sales[Amount] for all sales containing ProductID 101
Attempts:
2 left
💡 Hint

Consider how filter context works with many-to-many via bridge tables.

visualization
advanced
2:30remaining
Visualizing Many-to-Many Relationships

You want to create a Power BI report showing total sales by Customer and Product Category. Customers can buy products from multiple categories, and categories have many products. The data model uses a many-to-many relationship between Customers and Product Categories through Sales.

Which visualization best shows total sales by Customer and Product Category with clear understanding?

AMatrix visual with Customers as rows and Product Categories as columns showing total sales
BStacked bar chart with Customers on X-axis and total sales stacked by Product Category
CPie chart showing total sales by Product Category only
DLine chart showing total sales over time without categories
Attempts:
2 left
💡 Hint

Think about how to show two categorical dimensions and their sales values clearly.

🔧 Formula Fix
advanced
2:00remaining
Debugging Relationship Filter Propagation

You created a many-to-many relationship between Students and Courses through an enrollment bridge table. You wrote this DAX measure to count courses per student:

CourseCount = COUNTROWS(RELATEDTABLE(Courses))

But the measure always returns 0. What is the most likely reason?

ARELATEDTABLE does not work across many-to-many relationships without proper filter direction
BCOUNTROWS cannot be used on the Courses table
CThe relationship should be one-to-many, not many-to-many
DThe measure syntax is incorrect and causes an error
Attempts:
2 left
💡 Hint

Check how filter direction affects RELATEDTABLE in many-to-many setups.

🎯 Scenario
expert
3:00remaining
Designing a Data Model with Mixed Relationships

Your company tracks Employees, Projects, and Skills. Each employee can work on many projects (one-to-many), and employees can have multiple skills while skills can belong to many employees (many-to-many).

Which data model design correctly represents these relationships in Power BI?

ACreate many-to-many relationships between Employees and Projects, and Employees and Skills without bridge tables
BCreate one-to-one relationships between Employees and Projects, and Employees and Skills
CCreate a one-to-many relationship from Employees to Projects, and a many-to-many relationship between Employees and Skills using a bridge table
DCreate one-to-many relationships from Skills to Employees and Projects
Attempts:
2 left
💡 Hint

Consider the natural cardinality of each relationship and how bridge tables help many-to-many.