Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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.
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |