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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
An0n
Frequent Visitor

Looking up values from two columns in a different table

Dear community,

 

In my PBI model I have two tables, with the below random sample data. I want to link Table 1 and Table 2 by looking up the CONTRACT in Table 2 from either ID1 or ID2 column and match it to the ID column in Table 1 to then show a combination of the tables in the Visualization view (in a table). I tried with creating relationships but it does not work because you can't have two many-to-many relationships active at the same time.

 

Table 1:

IDOther columnAmount ID1Amount ID2
FAR17942xyz90
3406132abc0170
1122208def02000
112202jkl3400
3406115ghi800
FAR17947mno015

 

Table 2:

CONTRACTID1ID2
DEAL05FAR17942FAR17947
DEAL1234061153406132
DEAL191122021122208

 

Desired Table in Visualization view:

CONTRACTID1ID2Amount ID1Amount ID2
DEAL05FAR17942FAR17947915
DEAL123406115340613280170
DEAL1911220211222083402000

 

Thanks in advance!

2 REPLIES 2
SamInogic
Super User
Super User

Hi @An0n ,

You can create two “Amount ID1” and “Amount ID2” columns within “Table 2” table with below DAX expression for expected output.


Amount ID1 = LOOKUPVALUE('Table 1'[Amount ID1], 'Table 1'[ID], 'Table 2'[ID1])


Amount ID2 = LOOKUPVALUE('Table 1'[Amount ID2], 'Table 1'[ID], 'Table 2'[ID2])


Please refer to the below screenshot for the output.

SamInogic_0-1682425514998.png


If this answer helps, please mark it as an Accepted Solution so it would help others to find the solution.


Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Thanks for your suggestion. In the actual data there are 100K rows so multiple rows with value amounts with different split of column attributes.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.