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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Relate primary key to multiple columns

I have three data tables that look like this:

BIProblem.png

I have many visuals/charts/tables that center around ItemTable and use ItemTable as a filter.

Right now, I have ItemTable related directly ProblemLog by Item -- so if I filter to A1 from ItemTable, I just see Problem #1. This is a 1:Many relationship (can have multiple problems for one item).

 

The challenge I have is taking into account the ParentChild table. When I filter ItemTable to A1, I'd like to see the Problems for A1 and all of its children. So when filtering for A1, I need to see Problem #1 and Problem #3, because D4 is a child of A1.

 

Does anyone have a thought on how to set up relationships with the ParentChild table?

 

It's almost like I need the relationships set up like this, though I don't think this would actually work since there can only be one active relationship:

 

BI2.png

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Update, solved this, here's the simplified solution for anyone searching in the future:

I manipulated my ParentChild table to take this format, then was able to relate ItemTable to ParentChild to ProblemLog.

BI3.png

View solution in original post

parry2k
Super User
Super User

@Anonymous Check the attached solution.

 

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous Check the attached solution.

 

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k -- thanks, this is the almost exact approach I used.

I actually created 4 separate queries for each "child" level and then appended the four together -- using Unpivot is much better! THANK YOU!

Anonymous
Not applicable

Update, solved this, here's the simplified solution for anyone searching in the future:

I manipulated my ParentChild table to take this format, then was able to relate ItemTable to ParentChild to ProblemLog.

BI3.png

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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