Forum Discussion
Anonymous
8 years agoNot applicable
Append one table onto another filtering by common ID using DAX
I have two tables; table 1 and 2 that contains the same columns. I would like to append table 2 onto table 1, but only when the parent ID in table two matches a parent ID in table 1. The case can be ...
- 8 years ago
Hi Anonymous,
New a calculated table with DAX.
Table3 = UNION ( Table1, FILTER ( Table2, LOOKUPVALUE ( Table1[Parent ID], Table1[Parent ID], Table2[Parent ID] ) <> BLANK () ) )Best regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
8 years agoHi Anonymous,
New a calculated table with DAX.
Table3 =
UNION (
Table1,
FILTER (
Table2,
LOOKUPVALUE ( Table1[Parent ID], Table1[Parent ID], Table2[Parent ID] )
<> BLANK ()
)
)
Best regards,
Yuliana Gu
Anonymous
8 years agoNot applicable
Thank you so much v-yulgu-msft. This works well!
To others reading this, i got another suggestion as well that also works:
Res= UNION (test1; filter(test2; test2[ParentID] IN DISTINCT(test1[ParentID])))
Cheers