Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Everyone,
I have 5 tables:
Table 1
Id 1 | City |
1 | New York |
2 | London |
3 | Sydney |
Table 2
Id 1 | City |
4 | New Jersey |
5 | Dallas |
6 | Melbourne |
Table 3
Id 1 | City |
7 | Dubai |
8 | Mumbai |
9 | Delhi |
Table 4
Id 1 | City |
10 | Munich |
11 | Perth |
12 | Kolkatta |
Table 5
Id 1 | City |
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
How do I get the city value in table 5 from all the 4 tables?
Solved! Go to Solution.
@PhilipTreacy Just found the solution:
Location = Lookupvalue(Table1[City], Table1[ID], Table5[ID],
Lookupvalue(Table2[City], Table2[ID], Table5[ID],
Lookupvalue(Table3[City], Table3[ID], Table5[ID],
Lookupvalue(Table4[City], Table4[ID], Table5[ID]))))
Thanks for your help
@Anonymous
Hi,
Please @ mention me in replies or I won't be notified that you've responded. Type @ then select my name.
Is it necessary to add a new column to an existing table? Rater than just display the City corresponding to the ID in a visual?
Regards
Phil
Proud to be a Super User!
@PhilipTreacy Just found the solution:
Location = Lookupvalue(Table1[City], Table1[ID], Table5[ID],
Lookupvalue(Table2[City], Table2[ID], Table5[ID],
Lookupvalue(Table3[City], Table3[ID], Table5[ID],
Lookupvalue(Table4[City], Table4[ID], Table5[ID]))))
Thanks for your help
Hi @Anonymous
Do you actually have Table5 which consist of just a single column of ID's? Or do you want to create a table from the other 4 tables?
If it's the latter you can use UNION to create this table. From the Ribbon lick on Table Tools->New table and enter this DAX
Table5 = UNION(Table1, Table2, Table3, Table4)
Regards
Phil
Proud to be a Super User!
Hi Phil,
I appreciate your response to my question.
I actually have separate table (Table 5) in which I want to add all cities from the other 4 tables.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
75 | |
72 | |
39 | |
29 | |
27 |
User | Count |
---|---|
97 | |
96 | |
58 | |
44 | |
40 |