Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 | |||
Product | Delivery Location id | Owner | Redelivery location id |
BA | 13 | Tom | 44 |
AA | 87 | Pia | 10 |
BC | 93 | Ram | 92 |
BB | 96 | Mark | 39 |
CC | 49 | Alan | 20 |
DD | 24 | Max | 31 |
EE | 32 | Lex | 81 |
Table 2 | |
Location ID | Location name |
10 | Bremen |
13 | Munich |
44 | Frankfurt |
87 | Berlin |
92 | Sttutguart |
93 | Aachen |
96 | Rostock |
Thanks!
Solved! Go to Solution.
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:-
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
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
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:-
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
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |