Forum Discussion
Concatenate two data from different tables without reference
Concatenate two data from different tables without reference
Sample data and output
| Style No.(Table1) | Region(Table2) | Concatenate(Output) |
| ABCD03700I | BIHAR | ABCD03700I,BIHAR |
| ABCD06299 | BLR, MYS & TMKR | ABCD03700I,BLR, MYS & TMKR |
| ABCD08461 | UTTAR PRADESH | ABCD03700I,UTTAR PRADESH |
| ABCD08684B | TAMIL NADU | ABCD03700I,TAMIL NADU |
| ABCD08684E | TELANGANA | ABCD03700I,TELANGANA |
| ABCD09297 | ORISSA | ABCD03700I,ORISSA |
| ABCD09302 | MH,GOA & GJ | ABCD03700I,MH,GOA & GJ |
| ABCD09351 | DL & PB | ABCD03700I,DL & PB |
| ABCD09778 | ABCD06299,BIHAR | |
| ABCD09838B | ABCD06299,BLR, MYS & TMKR | |
| ABCD06299,UTTAR PRADESH | ||
| ABCD06299,TAMIL NADU | ||
| ABCD06299,TELANGANA | ||
| ABCD06299,ORISSA | ||
| ABCD06299,MH,GOA & GJ | ||
| ABCD06299,DL & PB | ||
| ABCD08461,BIHAR | ||
| ABCD08461,BLR, MYS & TMKR | ||
| ABCD08461,UTTAR PRADESH | ||
| ABCD08461,TAMIL NADU | ||
| ABCD08461,TELANGANA | ||
| ABCD08461,ORISSA | ||
| ABCD08461,MH,GOA & GJ | ||
| ABCD08461,DL & PB | ||
| ABCD08684B,BIHAR | ||
| ABCD08684B,BLR, MYS & TMKR | ||
| ABCD08684B,UTTAR PRADESH | ||
| ABCD08684B,TAMIL NADU | ||
| ABCD08684B,TELANGANA | ||
| ABCD08684B,ORISSA | ||
| ABCD08684B,MH,GOA & GJ | ||
| ABCD08684B,DL & PB | ||
| ABCD08684E,BIHAR | ||
| ABCD08684E,BLR, MYS & TMKR | ||
| ABCD08684E,UTTAR PRADESH | ||
| ABCD08684E,TAMIL NADU | ||
| ABCD08684E,TELANGANA | ||
| ABCD08684E,ORISSA | ||
| ABCD08684E,MH,GOA & GJ | ||
| ABCD08684E,DL & PB |
arvindarvind24 , crossjoin
new table = Crossjoin(Table1, Table2)
or
new table = addcolumns(Crossjoin(Table1, Table2) , "Concat", [Style No] & ", " & [Region])
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] )
9 Replies
- amitchandakSuper User
arvindarvind24 , crossjoin
new table = Crossjoin(Table1, Table2)
or
new table = addcolumns(Crossjoin(Table1, Table2) , "Concat", [Style No] & ", " & [Region])
- ArulSuper User
you can also try to merge the tables in Power Query Editor as mentioned in the below community thread.
https://community.powerbi.com/t5/Desktop/Concatenate-String-Fields-From-Different-Tables/m-p/1425618
Thanks,
Arul
- tamerj1Community Champion
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] )- arvindarvind24Helper II
Hi tamerj1 ,
Thank you for ur Solution it's working fine and if we need to add a new data from table 3 to
Concatenate.- tamerj1Community Champion
arvindarvind24
Sure Please provide more details