Forum Discussion
mhdilyas
3 years agoFrequent Visitor
combine specifc column from different table
we have imported data from diffirent data source, all data table have one common column and want to append specific not all. Table1, table2, table 3 cul1, col2, cul3 append to new table in colu...
- Anonymous3 years ago
Hi mhdilyas ,
You just need modify the dax formula:
Table 4 = VAR tmp1 = DISTINCT ( 'Table'[Product] ) VAR tmp2 = DISTINCT ( 'Table 2'[Product] ) VAR tmp3 = DISTINCT ( 'Table 3'[Product] ) VAR tmp4 = SELECTCOLUMNS ( tmp1, "P1", [Product] ) VAR tmp5 = SELECTCOLUMNS ( tmp2, "P2", [Product] ) VAR tmp6 = SELECTCOLUMNS ( tmp3, "P3", [Product] ) VAR tmp7 = UNION ( tmp4, tmp5, tmp6 ) VAR tmp8 = FILTER ( tmp7, [P1] <> BLANK () ) RETURN SELECTCOLUMNS ( tmp8, "Product", [P1] )Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi mhdilyas ,
Please try below steps:
1. below is test table
Table:
Table2:
Table3:
2. create a table with below dax formula
Table 4 =
VAR tmp1 =
SELECTCOLUMNS ( 'Table', "P1", [Product] )
VAR tmp2 =
SELECTCOLUMNS ( 'Table 2', "P2", [Product] )
VAR tmp3 =
SELECTCOLUMNS ( 'Table 3', "P3", [Product] )
VAR tmp4 =
UNION ( tmp1, tmp2, tmp3 )
RETURN
SELECTCOLUMNS ( tmp4, "Product", [P1] )
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.