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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Yug
Frequent Visitor

Connecting two columns in Table 1 with a one column in Table 2

I have two tables where:

Table 1 has two columns with location id information. "Delivery loation id", and "redelivery location id"

Table 2 contains the mapping of all location ids to the location names.

 

I need to connect "delivery location id" and "redelivery location id" to the same Table 2 in order to map the location names for each columns in TAble 1.

 

PowerBI is only allowing to have one active relation with Table 2.

Please suggest how I can map both columns from Table 1 to Table 2. 

 Table 1  
    
ProductDelivery Location idOwnerRedelivery location id
BA13Tom44
AA87Pia10
BC93Ram92
BB96Mark39
CC49Alan20
DD24Max31
EE32Lex81

 

Table 2 
  
Location IDLocation name
10Bremen
13Munich
44Frankfurt
87Berlin
92Sttutguart
93Aachen
96Rostock

 

Thanks!

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Yug ,

 

You could create two columns like below in table 1:-

delivery_location = LOOKUPVALUE(_table2[Location name],_table2[Location ID],_table1[Delivery Location id])
redelivery_location = LOOKUPVALUE(_table2[Location name],_table2[Location ID],_table1[Redelivery location id])

Output:-

Samarth_18_0-1649772935243.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

2 REPLIES 2
Yug
Frequent Visitor

Hi @Samarth_18 ,

 

Thanks a lot. This is helpful. 

 

Just one further question: Do I need to also lookup all other columns from Table 2 (such as: longitutide, latitude, Zones etc) within Table 1? OR is there any other way to connect to other additional columns in Table 2?

 

Thanks in advance!

Best regards,

Yug

Samarth_18
Community Champion
Community Champion

Hi @Yug ,

 

You could create two columns like below in table 1:-

delivery_location = LOOKUPVALUE(_table2[Location name],_table2[Location ID],_table1[Delivery Location id])
redelivery_location = LOOKUPVALUE(_table2[Location name],_table2[Location ID],_table1[Redelivery location id])

Output:-

Samarth_18_0-1649772935243.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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