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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
anryb
Regular Visitor

Multiple relationships between tables?

Hello all,

 

Brand new to Power Bi and having trouble figuring something out. 

 

I have a product table that contains Product IDs. 

I also have an order table with orders, some of which contain multiple product ids. Right now they are in one cell, but I can split them so that each "line item" is in its own column.

 

How do make this relationship work between the tables when I have 1 product id in product table that needs to be linked to multiple product ids in another? 

 

Thanks!

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@anryb,

 

In Power Query, go to the Order table and split the column with multiple Product IDs into rows (one row per Product ID). Then create the relationship between the tables using Product ID.

 

DataInsights_0-1724360109229.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @anryb ,

 

Did @DataInsights  reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.

 

Best Regards,
Adamk Kong

anryb
Regular Visitor

@DataInsights 

The line item fields are in json and look like the following. This example order has 2 product ids. 

 

Its quite long when copied here so I made a pastebin link:

"line_items": [ { "id": 14419813204035, - Pastebin.com

 

@anryb,

 

Thanks for the example. You could try Transform --> Parse --> JSON for that column, and then split into rows.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




DataInsights
Super User
Super User

@anryb,

 

In Power Query, go to the Order table and split the column with multiple Product IDs into rows (one row per Product ID). Then create the relationship between the tables using Product ID.

 

DataInsights_0-1724360109229.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @DataInsights ,

 

Thanks so much for the response. 

 

My "line item" column that contains the product ids also has other info. Is there way to extract text between delimiters by every instance of that delimiter into a column so that I can do what you suggested? When i extract value by text between delimiter it only grabs the first instance. 

 

anryb_0-1724362829439.png

 

@anryb,

 

You may need to do some additional string manipulation prior to splitting Product ID into rows. The objective would be to remove everything except the Product IDs, and then split into rows. Would you be able to paste an example?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.

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.

Top Solution Authors
Top Kudoed Authors