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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.