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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Aikeno
Helper I
Helper I

Relation with multiple possibilities

Hello, 

 

I try to create something like this in Power BI.

I have two table (1 and 2) and i try to create a table like on the right of the picture.

I am able to dot it with only Champion name or Investigator name on my right table but im struggling to have both is it something possible ?

 

Aikeno_2-1731415206151.png

 

If yes, how can I achieve that ?

 

Thanks in advance !

 

 

 

1 ACCEPTED SOLUTION
Visharavana
Resolver I
Resolver I

Hi @Aikeno 
You can achieve this in two different ways.

Lookupvalue:

championname = lookupvalue('table2'[firstname],'table1'[championid],'table2'[userid])

investigatorname = lookupvalue('table2'[firstname],'table1'[investigatorid],'table2'[userid])

 

Userelationship:

Same as first method, you can create two relationship one is active and another one is inactive relationship.

see this link userelationship

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Aikeno ,

You can create two calculated columns in the table 'Table 1' as below to get it, please find the details in the attachment.

Champion full name =
CALCULATE (
    MAX ( 'Table 2'[First name] ) & " "
        & MAX ( 'Table 2'[Last name] ),
    FILTER ( 'Table 2', 'Table 2'[User ID] = 'Table 1'[Champion ID] )
)
Investigator full name = 
CALCULATE (
    MAX ( 'Table 2'[First name] ) & " "
        & MAX ( 'Table 2'[Last name] ),
    FILTER ( 'Table 2', 'Table 2'[User ID] = 'Table 1'[Investigator ID] )
)

vyiruanmsft_0-1731476874697.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Visharavana
Resolver I
Resolver I

Hi @Aikeno 
You can achieve this in two different ways.

Lookupvalue:

championname = lookupvalue('table2'[firstname],'table1'[championid],'table2'[userid])

investigatorname = lookupvalue('table2'[firstname],'table1'[investigatorid],'table2'[userid])

 

Userelationship:

Same as first method, you can create two relationship one is active and another one is inactive relationship.

see this link userelationship

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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