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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NiugeS
Helper V
Helper V

Stuck with Relationships - Can't work it out - New to Power BI

Hi guys - i've been at this for several days trying to work it out.  Been in and out of multiple youtube videos but not sure what i'm doing wrong or what I need to do.  Likely something very straight forward but can't get my head around it. 


In short, I have 4 tables and tried to recreate what i'm trying to do with images below as well as an example pbix.  The four tables are Location, People, People Links and Cars.

 

I want to have a slicer to when a location is picked, it displays the relevant parent and child(s) and what cars they have. 

LocationParentChildCar
Prince TishroydVanesa CobbLibbie MaganaBmw R1100S ABS
Prince TishroydVanesa CobbShanon LeechChevrolet SONIC

 

or like this if Prince Pointal is picked

 

LocationParentChildCar
Prince PointalRubie TownsendOm NewmanNissan ARMADA


I'm honestly stumped and super greatful for any help...    tables below and pbix attached.. Family Test Pbix  

Location 
CityID
Prince TishroydB1001
San RaytroyphiB1001
Cape BrierfegibB1001
Prince PointalC1001
Grand ThoubewdC1001
BaliadsorE1001
Moose XmundmilesE1001

 

People  
IDTypeName
A1001ChildLibbie Magana
D1001ChildShanon Leech
J1001ChildOm Newman
K1001ChildShanay Harris
L1001ChildOlivier Stott
M1001ChildAlastair Roth
Q1001ChildMillie-Rose Mcguire
B1001ParentVanesa Cobb
C1001ParentRubie Townsend
E1001ParentSol Winter

 

People Link 
IDLinked: IDLinked Issue Direction
B1001A1001Outward
B1001D1001Outward
A1001B1001Inward
D1001B1001Inward
C1001J1001Outward
J1001C1001Inward
E1001K1001Outward
E1001L1001Outward
E1001M1001Outward
E1001Q1001Outward
K1001E1001Inward
L1001E1001Inward
M1001E1001Inward
Q1001E1001

Inward

 

IDCar
A1001Bmw R1100S ABS
D1001Chevrolet SONIC
J1001Nissan ARMADA
K1001Arctic Cat M 6000 SNO PRO
L1001Arctic Cat M1000 EFI 162
M1001Arctic Cat ZR 6000 EL
Q1001Honda CRF50F

 


Thank you

 

 

1 ACCEPTED SOLUTION
vivran22
Community Champion
Community Champion

Hello @NiugeS 

 

You may use Power Query for this:

Capture.PNG

 

Solution pbix file

 

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

View solution in original post

3 REPLIES 3
vivran22
Community Champion
Community Champion

Hello @NiugeS 

 

You may use Power Query for this:

Capture.PNG

 

Solution pbix file

 

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

@vivran22  Thank you so much.  I couldn't work that out.

As the location table is quite large with mulitple columns, can this still be achieved without merging the two?  Many thanks for all your help.

vivran22
Community Champion
Community Champion

Hello @NiugeS 

 

What is the source of the data table? Is it SQL? You may write queries and bring less tables in Power BI (2 instead of 4). That is a better approach.

 

Cheers!
Vivek

https://www.vivran.in/
Connect on LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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