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
gvg
Post Prodigy
Post Prodigy

Making different relationships active

Hi.

I've read a few threads about this issue but can not find a solution for my problem. 

I have two tables :

 

Capture.PNG         Capture2.PNG

 

I want to show a table visual with Supplier address, Buyer address and Amount. I have active relationship ID-to-Supplier address. How do I get address for the Buyer, please? I read about USERELATIONSHIP, it says it needs an expression as the first parameter. What kind of expression do I put in USERELATIONSHIP in order to get to desired result? My result table should look like this:

 

ccc3.PNG

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @gvg,

 

You can achieve this without user relationship since you want to return the value of specif address you can create a measure or column with the following:

 

MEASURE = LOOKUPVALUE(Adress[Adress],Adress[ID],MAX(Data[Buyer adress]))

COLUMN = LOOKUPVALUE(Adress[Adress],Adress[ID],Data[Buyer adress])

 

Taknig into account good practices and and that a calculated column uses space on your model if you can replace the column by a measure I would use the measure.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @gvg,

 

You can achieve this without user relationship since you want to return the value of specif address you can create a measure or column with the following:

 

MEASURE = LOOKUPVALUE(Adress[Adress],Adress[ID],MAX(Data[Buyer adress]))

COLUMN = LOOKUPVALUE(Adress[Adress],Adress[ID],Data[Buyer adress])

 

Taknig into account good practices and and that a calculated column uses space on your model if you can replace the column by a measure I would use the measure.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Yes, this works just fine. Thanks!

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.