Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I have 2 tables with:
Table1
id Col1 Col2 Col3
1 A BB 2
1 A CC 4
1 B AA 5
2 A CC 10
2 B AA 6
2 C CC 8
2 A CC 10
3 D BA 6
3 H FC 8
Table2
id Col1 Col2 Col3
1 XX4 1 2
1 AA5 5 4
1 BB1 8 5
3 AC1 9 10
3 BD2 10 6
3 C CC 8
Result expected:
Table_Res
id Col3
1 2
1 4
1 5
3 6
3 8
I need to create a table with column id and Col3 from Table1 but only where id included in table2.
A kinf of : select id,col3 from table1 inner join table2 on table1.id=table2.id
Thanks for your help.
Solved! Go to Solution.
HI @Madxfr ,
You can use values function to extract table 2 id and use 'in' operator to compare with these fields:
NEW Table = SELECTCOLUMNS ( FILTER ( Table1, [id] IN VALUES ( Table2[id] ) ), "id", [id], "Col3", [Col3] )
Regards,
Xiaoxin Sheng
HI @Madxfr ,
You can use values function to extract table 2 id and use 'in' operator to compare with these fields:
NEW Table = SELECTCOLUMNS ( FILTER ( Table1, [id] IN VALUES ( Table2[id] ) ), "id", [id], "Col3", [Col3] )
Regards,
Xiaoxin Sheng
Thanks, it's faster than merge table and so simple when you have the solution 😉
User | Count |
---|---|
102 | |
92 | |
85 | |
78 | |
71 |
User | Count |
---|---|
113 | |
104 | |
101 | |
73 | |
65 |