Forum Discussion
Concatenate two data from different tables without reference
- 4 years ago
arvindarvind24 , crossjoin
new table = Crossjoin(Table1, Table2)
or
new table = addcolumns(Crossjoin(Table1, Table2) , "Concat", [Style No] & ", " & [Region])
- 4 years ago
Hi arvindarvind24
Here is a sample file with the solution https://we.tl/t-IHBj2FTgwNConcatenated Table = SELECTCOLUMNS ( GENERATE ( Table1, ADDCOLUMNS ( Table2, "@Concatenate", Table1[Style No.] & "," & Table2[Region] ) ), "Concatenate", [@Concatenate] )
arvindarvind24
The sample expected result does not clarify whether this is a crossjoin of the three tables or a merge between table1 and table3 then a crossjoj with table2. The complete crossjoin would be
Concatenated Table =
SELECTCOLUMNS (
GENERATE (
Table1,
GENERATE (
Table2,
ADDCOLUMNS (
Table3,
"@Concatenate", Table1[Style No.] & "," & Table3[Rank1] & "," & Table2[Region]
)
)
),
"Concatenate", [@Concatenate]
)
If I want to use a cross join this will work?
oncatenatedTable =
SELECTCOLUMNS (
GENERATE (
ITEMMASTER,
GENERATE (
Measurestbl,
ADDCOLUMNS (Crossjoin(BaseStock),
"@Concatenate",
ITEMMASTER[STYLE_NUMBER] & "," & BaseStock[Region] & "," & Measurestbl[RANK11]
)
)
),
"Concatenate", [@Concatenate]
)
- tamerj14 years ago
Community Champion
Hi arvindarvind24
Please useConcatenated Table = SELECTCOLUMNS ( GENERATE ( ITEMMASTER, GENERATE ( BaseStock, ADDCOLUMNS ( Measurestbl, "@Concatenate", ITEMMASTER[Style No.] & "," & Measurestbl[Rank1] & "," & BaseStock[Region] ) ) ), "Concatenate", [@Concatenate] )