Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
nick9one1
Helper III
Helper III

fixing a relationship

I have some related tables, and I'm trying to work out the best way to 'fix' a relationship issue.

going from left to right, A site has many categories, and each category has many items. 

 

nick9one1_0-1666199832066.png

 

 

In the initial table design 'categories' and 'site items' tables didnt have direct relationship

nick9one1_1-1666199994343.png

 

So in an attempt to fix I've created a custom column in the Site Items and Categories tables 

 

CombinedName = 'Categories'[Sites] &" - " & 'Categories'[Category]

 

 

Then I added a relationship. But the relationship is many to many, and it should be one to many. 

 

What is the best way to fix this?

 

 

1 ACCEPTED SOLUTION
grantsamborn
Solution Sage
Solution Sage

I would stick with the 1st layout but use the CombinedName to join Categories to SiteItems.

 

ie.

Sites --> Categories --> SiteItems

 

If you still unable to create a many-to-one relationship between Categories and SiteItems, it is probably a data issue.  (ie. SiteItems without a corresponding Category)

 

I hope this helps.

 

View solution in original post

2 REPLIES 2
nick9one1
Helper III
Helper III

Thanks, It was a data issue as you suggested. Found some blank rows in the table. 

grantsamborn
Solution Sage
Solution Sage

I would stick with the 1st layout but use the CombinedName to join Categories to SiteItems.

 

ie.

Sites --> Categories --> SiteItems

 

If you still unable to create a many-to-one relationship between Categories and SiteItems, it is probably a data issue.  (ie. SiteItems without a corresponding Category)

 

I hope this helps.

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors